Skip to content

DOI not found. #2

Description

@kong-johnny
$ SCI_HUB_URL=https://sci-hub.yt/ doi2pdf --url "https://doi.org/10.1128/msphere.00109-24" --output "text.
pdf" --open
Found paper:  Differential development of antibiotic resistance and virulence between <i>Acinetobacter</i> species
Traceback (most recent call last):
  File "/home/duanxinran/miniconda3/lib/python3.13/site-packages/doi2pdf/main.py", line 39, in doi2pdf
    pdf_content = get_pdf_from_url(pdf_url)
  File "/home/duanxinran/miniconda3/lib/python3.13/site-packages/doi2pdf/main.py", line 128, in get_pdf_from_url
    raise NotFoundError("Bad PDF URL.")
doi2pdf.main.NotFoundError: Bad PDF URL.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/duanxinran/miniconda3/bin/doi2pdf", line 8, in <module>
    sys.exit(main())
             ~~~~^^
  File "/home/duanxinran/miniconda3/lib/python3.13/site-packages/doi2pdf/main.py", line 168, in main
    doi2pdf(
    ~~~~~~~^
        args.doi, output=args.output, name=args.name, url=args.url, open_pdf=args.open
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/home/duanxinran/miniconda3/lib/python3.13/site-packages/doi2pdf/main.py", line 41, in doi2pdf
    pdf_url = retrieve_scihub(doi)
  File "/home/duanxinran/miniconda3/lib/python3.13/site-packages/doi2pdf/main.py", line 114, in retrieve_scihub
    raise NotFoundError("DOI not found.")
doi2pdf.main.NotFoundError: DOI not found.

I tried to change other mirrors and got the same error logs.

Activity

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions