ferru97 / PyPaperBot

PyPaperBot is a Python tool for downloading scientific papers using Google Scholar, Crossref, SciHub, and SciDB.
MIT License
409 stars 77 forks source link

UnboundLocalError: local variable 'scholar_pages' referenced before assignment #34

Closed sarah-paradis closed 3 years ago

sarah-paradis commented 3 years ago

When trying to download papers using DOI I got the following error:

C:\Users\sparadis>python -m PyPaperBot --doi="10.0086/s41037-711-0132-1" --dwn-dir="C:\User\example\papers"`

PyPaperBot is a Python tool for downloading scientific papers using Google Scholar, Crossref and SciHub. If you like this project, you can give me a cup of coffee at --> https://www.paypal.com/paypalme/ferru97 <-- :)

Traceback (most recent call last): File "C:\Users\sparadis\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 197, in _run_module_as_main return _run_code(code, main_globals, None, File "C:\Users\sparadis\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 87, in _run_code exec(code, run_globals) File "C:\Users\sparadis\AppData\Local\Programs\Python\Python39\lib\site-packages\PyPaperBot__main.py", line 139, in main() File "C:\Users\sparadis\AppData\Local\Programs\Python\Python39\lib\site-packages\PyPaperBot\main__.py", line 136, in main start(args.query, scholar_pages, dwn_dir, args.min_year , max_dwn, max_dwn_type , args.journal_filter, args.restrict, DOIs, args.scihub_mirror) UnboundLocalError: local variable 'scholar_pages' referenced before assignment

ferru97 commented 3 years ago

Hi Thanks for the report, I'll fix it as soon as possible

ferru97 commented 3 years ago

Solved with the new version v1.1.1 :). Download it and try again

sarah-paradis commented 3 years ago

Works perfectly now, thanks!