petermr / pygetpapers

a Python version of getpapers
Apache License 2.0
78 stars 9 forks source link

[crash] NoneType object is not subscriptable #33

Closed raffaem closed 2 years ago

raffaem commented 2 years ago
$ pygetpapers --query "The Impact of pH on CatalyticallyCritical Protein ConformationalChanges:The Caseof the Urease, a Nickel Enzyme" --pdf
INFO: Total Hits are 0
Traceback (most recent call last):
  File "/home/raffaele/.local/bin/pygetpapers", line 8, in <module>
    sys.exit(main())
  File "/home/raffaele/.local/lib/python3.10/site-packages/pygetpapers/pygetpapers.py", line 538, in main
    callpygetpapers.handlecli()
  File "/home/raffaele/.local/lib/python3.10/site-packages/pygetpapers/pygetpapers.py", line 531, in handlecli
    self.handle_running_of_args(args)
  File "/home/raffaele/.local/lib/python3.10/site-packages/pygetpapers/pygetpapers.py", line 314, in handle_running_of_args
    api_handler.handle_cli_logic(args)
  File "/home/raffaele/.local/lib/python3.10/site-packages/pygetpapers/pygetpapers.py", line 207, in handle_cli_logic
    self.api.apipaperdownload(args)
  File "/home/raffaele/.local/lib/python3.10/site-packages/pygetpapers/europe_pmc.py", line 404, in apipaperdownload
    query_result = self.europepmc(query, size, synonym=synonym)
  File "/home/raffaele/.local/lib/python3.10/site-packages/pygetpapers/europe_pmc.py", line 105, in europepmc
    number_of_papers_there = self.create_final_paper_list(
  File "/home/raffaele/.local/lib/python3.10/site-packages/pygetpapers/europe_pmc.py", line 139, in create_final_paper_list
    output_dict[RESPONSE_WRAPPER][RESULT_LIST][RESULT], dict
TypeError: 'NoneType' object is not subscriptable
ayush4921 commented 2 years ago

Fixed in the latest version