clarivate / wos-amr

Utility scripts for using the Web of Science Links Article Match Retrieval Service (AMR) service.
MIT License
17 stars 3 forks source link

AttributeError: 'module' #5

Closed tobebryant2 closed 5 years ago

tobebryant2 commented 5 years ago

When running the script I always get this issue:

python /lookup_ids.py /issns_example.csv /issns_example2.csv

Traceback (most recent call last):
  File "/lookup_ids.py", line 108, in <module>
    main()
  File "/lookup_ids.py", line 87, in main
    lookup_groups = client.grouper(to_check, client.BATCH_SIZE)
AttributeError: 'module' object has no attribute 'grouper'

Any idea why this does not work?

gneissone commented 5 years ago

It seems like Python is not seeing the grouper method in the client.py file included in this repo. Make sure client.py is in the same directory as lookup_ids.py when running the script. Also, I'm not sure if it's related but the way you are running the script doesn't appear to be quite right. Try something like: python3 lookup_ids.py ids_example.csv output.csv

python3 may be aliased as python. You can check the version with python --version. The script is not compatible with Python 2. Python aliases and install locations vary with your platform and installation method.

gneissone commented 5 years ago

Please comment if the issue remains and I will reopen.