Skip to content

ResponseWrapper error (from EPMC) #48

@petermr

Description

@petermr

THIS IS A GOOD EXAMPLE OF HOW TO REPORT A BUG

Describe the bug
Query in pygetpapers in pygetpapers_literature_search.ipynb from Renu Kumari
https://colab.research.google.com/drive/1-vM3BKV7NjvFXAdLGuqyNMh4VhPq6uMa?usp=sharing

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://colab.research.google.com/drive/1-vM3BKV7NjvFXAdLGuqyNMh4VhPq6uMa?usp=sharing
  2. Launch first 2 cells to install/help
  3. Run cell 3
!pygetpapers -n -q "carbon emission"
  1. Produces
Traceback (most recent call last):
  File "/usr/local/bin/pygetpapers", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.10/dist-packages/pygetpapers/pygetpapers.py", line 537, in main
    callpygetpapers.create_argparser()
  File "/usr/local/lib/python3.10/dist-packages/pygetpapers/pygetpapers.py", line 530, in create_argparser
    self.runs_pygetpapers_for_given_args(self.query_namespace)
  File "/usr/local/lib/python3.10/dist-packages/pygetpapers/pygetpapers.py", line 312, in runs_pygetpapers_for_given_args
    api_handler.check_query_logic_and_run()
  File "/usr/local/lib/python3.10/dist-packages/pygetpapers/pygetpapers.py", line 183, in check_query_logic_and_run
    self.api.noexecute(self.query_namespace)
  File "/usr/local/lib/python3.10/dist-packages/pygetpapers/repository/europe_pmc.py", line 266, in noexecute
    totalhits = result[RESPONSE_WRAPPER][HITCOUNT]
KeyError: 'responseWrapper'

Expected behavior
I expected message that 10 hits had been found

Desktop (please complete the following information):

  • OS: MacOS
  • Browser Chrome
  • Version 123.0.6312.59 (Official Build) (arm64)

Additional context
This might be an error at EPMC - I will retry and also read their mailing list

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