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

Possible issue with requests #276

Open
Spyridion opened this issue Mar 15, 2023 · 4 comments
Open

Possible issue with requests #276

Spyridion opened this issue Mar 15, 2023 · 4 comments

Comments

@Spyridion
Copy link
Contributor

Spyridion commented Mar 15, 2023

Hi, I'm getting a key error with the init_response dictionary. Here's the error I got.

[00:05:13] banner: nHentai ver 0.5.2: あなたも変態。 いいね?
[00:05:13] main: Using mirror: https://nhentai.net
[00:05:13] main: Using viewer template "default"
[00:05:13] check_cookie: Cannot get your username, please check your cookie or use `nhentai --cookie` to set your cookie
[00:05:13] main: Using default language: japanese
Traceback (most recent call last):
  File "/usr/local/bin/nhentai", line 33, in <module>
    sys.exit(load_entry_point('nhentai==0.5.2', 'console_scripts', 'nhentai')())
  File "/usr/local/lib/python3.10/dist-packages/nhentai-0.5.2-py3.10.egg/nhentai/command.py", line 58, in main
    doujinshis = _search_parser(options.keyword, sorting=options.sorting, page=page_list,
  File "/usr/local/lib/python3.10/dist-packages/nhentai-0.5.2-py3.10.egg/nhentai/parser.py", line 283, in search_parser
    page = range(1, init_response['num_pages']+1)
KeyError: 'num_pages'
@RicterZ
Copy link
Owner

RicterZ commented Mar 15, 2023

Please provide your command for me to reproduct this issue

@Spyridion
Copy link
Contributor Author

Hey, sorry for the late reply. I'm not sure what solved it, but moving over to your docker image worked all of the sudden.

@Spyridion Spyridion reopened this Jun 10, 2023
@Spyridion
Copy link
Contributor Author

Hi, I'm reopening this because I met the same issue again. Here's the command I used: docker run --rm -it -v X:/temp/[kemonono]/en:/output -v X:/temp/.nhentai/:/root/.nhentai ricterz/nhentai --search="artist:kemonono" --format '[%i]%t' --page-all --download

@Spyridion
Copy link
Contributor Author

I found another command that's failing with the same error as well.

docker run --rm -it -v D:/temp/[akino-sora]/jp:/output -v D:/temp/.nhentai/:/root/.nhentai ricterz/nhentai --search="artist:akino-sora" --format '[%i]%t' --page-all --download

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants