Skip to content

Earlier fix has broken current release\(º □ º l|l)/  #46

Open

Description

@Tolu1

As a result of the fix in #45
Executing commands with or without --max-dwn-cites=10

!python -m PyPaperBot --query="Machine learning" --scholar-pages=1  --min-year=2018 --max-dwn-cites=10 --dwn-dir="\content\papers" --scihub-mirror="https://sci-hub.do"

Now results in

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 <-- :)

Query: Machine learning

Google Scholar page 1 : 10 papers found
Paper not found...
Traceback (most recent call last):
  File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/usr/local/lib/python3.7/dist-packages/PyPaperBot/__main__.py", line 148, in <module>
    main()
  File "/usr/local/lib/python3.7/dist-packages/PyPaperBot/__main__.py", line 145, in main
    start(args.query, args.scholar_results, scholar_pages, dwn_dir, proxy, args.min_year , max_dwn, max_dwn_type , args.journal_filter, args.restrict, DOIs, args.scihub_mirror)
  File "/usr/local/lib/python3.7/dist-packages/PyPaperBot/__main__.py", line 48, in start
    Paper.generateReport(to_download,dwn_dir+"result.csv")
  File "/usr/local/lib/python3.7/dist-packages/PyPaperBot/Paper.py", line 65, in generateReport
    with open(path, mode="w", encoding='utf-8', newline='', buffering=1) as w_file:
FileNotFoundError: [Errno 2] No such file or directory: '/content/papers/result.csv'

Activity

  1. ferru97 commented on Nov 1, 2021

    @ferru97
    Owner

    I tested with the same command and it seems to work. Can you try again using a different empty output folder?

  2. firmai commented on Nov 2, 2021

    @firmai

    I have the same, this used to work fine, but not anymore

    !python -m PyPaperBot --query="Semi-parametric models of spatial market integration" --scholar-pages=1 --scholar-results=1 --dwn-dir="/content" --scihub-mirror="https://sci-hub.st"

  3. ferru97 commented on Nov 2, 2021

    @ferru97
    Owner

    Ok I tested on linux and using as output floder /content it had a permission problem, but It worked using as output folder a folder in my home directory /home/user/content . Can you try again using as output folder something like /home/user/content?

  4. Tolu1 commented on Nov 2, 2021

    @Tolu1
    Author

    Google Colab might be causing this? I reverted back to v1.2.1 after I encountered this issue, it gave the same error.

    Then just a few hours ago it worked fine for me with the current release v1.2.2.

    !python -m PyPaperBot --query="Urban Resilience" --scholar-pages=7 --min-year=2017 --dwn-dir="/content/drive/MyDrive/Research/Papers/Test" --scihub-mirror="https://sci-hub.ee"

    But now with the same command, nothing works

    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 <-- :)
    
    Query: Urban Resilience
    
    Google Scholar page 1 : 10 papers found
    Paper not found...
    
    Google Scholar page 2 : 10 papers found
    Paper not found...
    
    Google Scholar page 3 : 10 papers found
    Paper not found...
    
    Google Scholar page 4 : 10 papers found
    Paper not found...
    
    Google Scholar page 5 : 10 papers found
    Paper not found...
    
    Google Scholar page 6 : 10 papers found
    Paper not found...
    
    Google Scholar page 7 : 10 papers found
    Paper not found...
    
    Work completed!
    If you like this project, you can offer me a cup of coffee at --> https://www.paypal.com/paypalme/ferru97 <-- :)
    

    I ran the package on my local machine (windows) it seemed to work fine, so it could be a Google Colab environment specific issue?

  5. ferru97 commented on Nov 2, 2021

    @ferru97
    Owner

    Yes at this point I think is a Google Colab issue, I tested the v1.2.2 on both Linux and Windows and it seems to work as long as you have the permissions to write in the selected output folder.

    @firmai do you also use the tool with Google Colab?

  6. firmai commented on Nov 3, 2021

    @firmai

    Yes, also use it with colab

  7. ferru97 commented on Oct 7, 2024

    @ferru97
    Owner

    Hi,
    sorry for the late reply, but PyPaperBot had been on standby until now.
    I've decided to resume development to improve it.

    I've created a Telegram channel where you can suggest improvements, report bugs, or request custom data mining scripts. Feel free to join if you're interested with the following LINK

    Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions