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

output_path referenced before assignment #12

Closed
backsy opened this issue Aug 21, 2018 · 4 comments
Closed

output_path referenced before assignment #12

backsy opened this issue Aug 21, 2018 · 4 comments

Comments

@backsy
Copy link

backsy commented Aug 21, 2018

Installed using pip on windows. Created the folders manually. See #10 .

.\ebook_crawler.exe webnovel 8093990805004205
Getting CSRF Token from https://www.webnovel.com/book/8093990805004205
CSRF Token = LI1UErwQVWiDGnvCmmpgBamfOpavmDGUCZJqglkP
Getting book name and chapter list...
1646 chapters found
Traceback (most recent call last):
File "c:\program files\python36\lib\runpy.py", line 193, in run_module_as_main
"main", mod_spec)
File "c:\program files\python36\lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "C:\Users\Karl\AppData\Roaming\Python\Python36\Scripts\ebook_crawler.exe_main
.py", line 9, in
File "C:\Users\Karl\AppData\Roaming\Python\Python36\site-packages\ebook_crawler_init
.py", line 34, in main
end_chapter=sys.argv[4] if len(sys.argv) > 4 else ''
File "C:\Users\Karl\AppData\Roaming\Python\Python36\site-packages\ebook_crawler\webnovel.py", line 44, in start
novel_to_kindle(self.output_path)
File "C:\Users\Karl\AppData\Roaming\Python\Python36\site-packages\ebook_crawler\binding.py", line 83, in novel_to_kindle
for file_name in sorted(os.listdir(output_path)):
UnboundLocalError: local variable 'output_path' referenced before assignment

@backsy
Copy link
Author

backsy commented Aug 21, 2018

Works if i use manual chapter range.

@dipu-bd
Copy link
Owner

dipu-bd commented Aug 21, 2018

i have fixed it. by the way, you should at least provide the starting chapter to download

@dipu-bd dipu-bd closed this as completed Aug 21, 2018
@backsy
Copy link
Author

backsy commented Aug 21, 2018

Meaning the beginning chapter isnt truly optional as stated in the readme.

@dipu-bd
Copy link
Owner

dipu-bd commented Aug 21, 2018

actually yes. if no beginning chapter is provided, the app tries to bind ebook from already downloaded contents. in your case you tried to bind ebook without downloading any contents.

dipu-bd pushed a commit that referenced this issue Feb 2, 2019
zGadli pushed a commit to zGadli/lightnovel-crawler that referenced this issue Aug 20, 2023
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