get_data() responding with { } or None
apowers5321 opened this issue · 4 comments
If it works on your PC, but not on your laptop, my first guess would be to make sure you migrated your API credentials correctly, and didn't do something like copy over invisible characters.
Following that, I would set the AMBIENT_LOG_LEVEL to debug, and watch your console. The HTTP Status codes return different messages. It might be helpful to see if you are rate limited, or something.
That's where I would start.
I will definitely double check the credentials, and as for setting the log level to debug, is that set as another environment variable or is that an argument within the API? (I'm at best a novice coder and know much about API's).
The easiest way is to pass it as a keyword argument
api = AmbientAPI(log_level="debug")
If debug doesn't work, you can also pass in console, which will just dump the errors with print() for old-school debugging :)
There are a few different arguments you can fiddle with.
Anything that uses kwargs.get(...) in the constructor can be passed in that way.
ambient_api/ambient_api/ambientapi.py
Line 94 in 08194b5
Thanks for the help! I was able to diagnose and fix the issue. Just needed some extra time to collect the data before outputting it to avoid the 429 limit.