Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Danbooru Api Key Login throws Key 0 #1

Closed
MemoriVR opened this issue Apr 21, 2022 · 1 comment
Closed

Danbooru Api Key Login throws Key 0 #1

MemoriVR opened this issue Apr 21, 2022 · 1 comment
Labels
object mismatch Bug because misleading object, parameter or property

Comments

@MemoriVR
Copy link

Describe the bug
Using the Api key and the user_id to log into danbooru will not work
the error:
Traceback (most recent call last):
File "test.py", line 10, in
asyncio.run(main())
File "C:\anaconda\envs\bot\lib\asyncio\runners.py", line 43, in run
return loop.run_until_complete(main)
File "C:\anaconda\envs\bot\lib\asyncio\base_events.py", line 616, in run_until_complete
return future.result()
File "test.py", line 6, in main
res = await dan.search(query="cat_girl", limit=1)
File "C:\anaconda\envs\bot\lib\site-packages\booru\client\danbooru.py", line 130, in search
self.not_random = Danbooru.append_obj(self.final)
File "C:\anaconda\envs\bot\lib\site-packages\booru\client\danbooru.py", line 38, in append_obj
if "id" in raw_object[i]:
KeyError: 0

To Reproduce
Intitialize Danbooru exactly like the documentation instructs.
using the username or number only user ID will not work
Gelbooru works however

Expected behavior
A clear and concise description of what you expected to happen.

Desktop (please complete the following information):

  • OS: Windows with Anaconda
  • 3.8.5

Additional context

@sinkaroid sinkaroid added the object mismatch Bug because misleading object, parameter or property label May 12, 2022
@sinkaroid
Copy link
Owner

Hi, thanks for reporting and fixed already. It is because danbooru:docs required parameter login instead user_id

also i have tests stuff without api auth so login properties may not same it all, If you encounter this misleading in another booru please open an issue again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
object mismatch Bug because misleading object, parameter or property
Projects
None yet
Development

No branches or pull requests

2 participants