Skip to content

cannot --restart #53

@miekka-q-1

Description

@miekka-q-1

When the current operation is interrupted, I want to try --restart (-r), but an error occurs.

Example (current operation):
pygetpapers -q "(PFAS AND (concentration OR occurrence))" -k 10 -o "test2" -x -s -p --synonym --startdate 2024-09-01 --enddate 2024-11-30
INFO: Total Hits are 3591
10it [00:00, ?it/s]
INFO: Saving XML files to D:\MyFile\pycharm_project\agents\test2*\fulltext.xml
0%| | 0/10 [00:00<?, ?it/s]INFO: Extracted the files for this paper
INFO: Wrote the pdf file for PMC11461027
10%|████████████████ | 1/10 [00:09<01:23, 9.26s/it]INFO: Extracted the files for this paper
INFO: Wrote the pdf file for PMC11650586
20%|████████████████████████████████▏ | 2/10 [00:57<04:19, 32.48s/it]INFO: Extracted the files for this paper
INFO: Wrote the pdf file for PMC11580174
INFO: Wrote the pdf file for PMC11580174
30%|████████████████████████████████████████████████▎ | 3/10 [01:47<04:11, 35.94s/it]

Then I use Ctrl+C to interrupt:
KeyboardInterrupt
^C

And then I tried to restart:
pygetpapers -q "(PFAS AND (concentration OR occurrence))" -k 10 -o "test2" -x -s -p --synonym --startdate 2024-09-01 --enddate 2024-11-30 -r

Then an error occurred:
Traceback (most recent call last):
File "", line 198, in _run_module_as_main
File "", line 88, in run_code
File "D:\program_anaconda\envs\agents\Scripts\pygetpapers.exe_main
.py", line 7, in
File "D:\program_anaconda\envs\agents\Lib\site-packages\pygetpapers\pygetpapers.py", line 537, in main
callpygetpapers.create_argparser()
File "D:\program_anaconda\envs\agents\Lib\site-packages\pygetpapers\pygetpapers.py", line 530, in create_argparser
self.runs_pygetpapers_for_given_args(self.query_namespace)
File "D:\program_anaconda\envs\agents\Lib\site-packages\pygetpapers\pygetpapers.py", line 312, in runs_pygetpapers_for_given_args
api_handler.check_query_logic_and_run()
File "D:\program_anaconda\envs\agents\Lib\site-packages\pygetpapers\pygetpapers.py", line 189, in check_query_logic_and_run
self.api.restart(self.query_namespace)
File "D:\program_anaconda\envs\agents\Lib\site-packages\pygetpapers\repository\europe_pmc.py", line 244, in restart
self.get_supplementary_metadata(
TypeError: EuropePmc.get_supplementary_metadata() got an unexpected keyword argument 'metadata_dictionary'

I'm confused that there was a TypeError. How to resolve this problem? Thanks!

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