Closed convolutionbbs closed 3 years ago
I've not seen this error before, perhaps the endpoint changed. I will look into this.
Same error for me. From what I found elsewhere it sounds like they did change something: https://stackoverflow.com/questions/65030818/javascript-gets-get-https-www-purpleair-com-json-400-bad-request-on-json-r
Thanks for the link, looks like this should be a simple patch.
Looks like it's perhaps related to this shift: https://docs.google.com/document/d/15ijz94dXJ-YAZLi9iZ_RaBwrZ4KtYeCy08goGBwnbCU/edit
The JSON dump of all sensors works at https://www.purpleair.com/data.json
but not at https://www.purpleair.com/json
Resolved in v1.2.2 with a temporary fix until api.purpleair.com/v1/
is usable.
Hello, Using 1.2.1 and trying to run the demo code to import all the available sensors:
from purpleair.network import SensorList p = SensorList() # Initialized 11,220 sensors!
Other sensor filters include 'outside', 'useful', 'family', and 'no_child'
df = p.to_dataframe(sensor_filter='all', channel='parent')
And it returns:
ValueError: No sensor data returned from PurpleAir: An empty querystring is not permitted. Please contact PurpleAir at contact@purpleair.com for assistance.
Is there another way to do this?
Thanks!