-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Errors running pygetpapers queries #40
Comments
Is this a Python 3.10 problem? Have you tested with it?
P.
…On Thu, Jun 23, 2022 at 8:07 PM Emanuel Faria ***@***.***> wrote:
*Describe the bug*
Running a pygetpapers query returns unexpected errors:
*To Reproduce*
*1. In terminal, run:*
% pygetpapers -q "(essential oil*)" -n
**2. See errors**
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.10/bin/pygetpapers", line 5, in <module>
from pygetpapers.pygetpapers import main
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pygetpapers/__init__.py", line 4, in <module>
from pygetpapers.download_tools import DownloadTools
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pygetpapers/download_tools.py", line 14, in <module>
import requests
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/requests/__init__.py", line 60, in <module>
from . import utils
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/requests/utils.py", line 32, in <module>
from .cookies import cookiejar_from_dict
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/requests/cookies.py", line 172, in <module>
class RequestsCookieJar(cookielib.CookieJar, collections.MutableMapping):
AttributeError: module 'collections' has no attribute 'MutableMapping'
*Expected behavior*
Query should return the number of articles available on EUPMC that satisfy
the query.
*Desktop (please complete the following information):*
- OS: MacOS
*Additional context*
pygetpapers seems to be installed properly. No errors present when
re-installing pygetpapers.
—
Reply to this email directly, view it on GitHub
<#40>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAFTCS5THN557BEYNLZZC2TVQSYV5ANCNFSM5ZVMEDGA>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
--
Peter Murray-Rust
Founder ContentMine.org
and
Reader Emeritus in Molecular Informatics
Dept. Of Chemistry, University of Cambridge, CB2 1EW, UK
|
@Mannyrules It doesn't seem like a python or pygetpapers problem to me. I tried running pygetpapers right now and it works for me. Maybe, try installing it in a virtual environment and see if the problem persists. In my opinion, the issue lies in some other libraries you have installed that have the same names as the python libraries used by libraries that pygetpapers depends on. |
@ayush4921 I've tried running the virtual environment, following he steps in the docanalysis readme, but when I get to the step to activate When I look in the venv directory, that file is not there. I think my machine is haunted by an evil spirit |
Neither pygetpapers or getpapers is respecting the query parameters. Is it because the programs aren't updated to work with the current version of EUPMC's API? Paste this into europmc and compare the download results in either program
|
SOLVED!! It turns out that because I am searching for terms with two-word that are surrounded by double quotes, I have to use a single quote at the beginning and end of the query! Bad: |
Perhaps pygetpapers should only allow (or, in the instructions, advise to use) the single-quote in the query rather than give people the option? If so, change the examples in the readme and any other instructions in the wiki |
@petermr @ayush4921
Describe the bug
Running a
pygetpapers
query returns unexpected errors below.NOTE: running
pygetpapers -h
orpygetpapers --help
returns the same errorsTo Reproduce
1. In terminal, run:
% pygetpapers -q "phytomedicine" -n
2. See errors
Expected behavior
Query should return the number of articles available on EUPMC that satisfy the query.
Desktop (please complete the following information):
Additional context
pygetpapers
seems to be installed properly. No errors present when re-installing pygetpapers.The text was updated successfully, but these errors were encountered: