This is gonna be stackoverflow-y, but this error only occurs with Danbooru, so I thought I'd ask and see if anyone else is having the same issue/knows how to fix it.
How do you authenticate iqdb_queries using python? I've tried using the requests module in the following way:
res = requests.post(url, data={'Url':file_url}, auth=('username', 'APIkey'))
but I'm getting a website error that says <p>undefined method `[]' for nil:NilClass</p> (note that this is the same as undefined method `[]' for nil:NilClass). Google says that this is caused by the method/attribute not being properly defined, but since I don't have access to danbooru's code, I don't know what it's missing. https://dev.to/ben/nomethoderror-undefined-method-for-nil-nilclass-explained-422b
This only occurs if I include the auth component; if I neglect it, I get a failed authentication error (duh, since it doesn't include the API key). Anyone know how to fix this?
Note that I've already looked through help:api and it doesn't seem to help.