Streaming API 406 error


#1

Hi all,

I’m trying out the Streaming API and keep getting a 406 error. I’m pretty sure I have my bounding box setup correctly, but can’t seem to get it to work.

Here’s a snippet of the location setup:

 loc = [-79.72297668457031,43.37158360778362,-79.72452163696289,43.5275177007501]

  stream = Stream(auth,listen)
  stream.filter(locations=loc)

Any suggestions?


#2

Try this

[-79.72452163696289,43.37158360778362,-79.72297668457031,43.5275177007501]


#3

Thanks! That did it, but TBH, I’m confused. I read that the bounding box started with the SW corner and from my mapping application it looked to be the other way around.

Did I misread something?

Also, I’m seeing tweets from New York in the stream, which doesn’t make sense. Should I just filter those in my python script?


#4

The bounding box for New York State is -79.762418, 40.477408, -71.778137, 45.010840, which covers your bounding box.

If your mapping app is not showing this as (SW, NE) then it’s the one that is confused :slight_smile: