jdrumgoole / gdelttools

Scripts to load the GDELT data set into MongoDB
Apache License 2.0
7 stars 6 forks source link

Invalid syntax when attempting to run command in gdelt-primer README.md #1

Closed webchick closed 2 years ago

webchick commented 2 years ago

I'm attempting to follow the instructions over at https://github.com/adriennetacke/gdelt-primer and it directs me to run the command:

$ python gdelttools/gdeltloader.py --ziplist master

However, when I do that, I get:

  File "gdelttools/gdeltloader.py", line 22
    def download_zips(collection, file_list: List[str]):
                                           ^
SyntaxError: invalid syntax

macOS Catalina, Python 2.7. Hm. Actually, I wonder if that's the issue...

webchick commented 2 years ago

Ok, when I attempt with python3 instead (Python 3.9.0), I get a different issue:

% python3 gdelttools/gdeltloader.py --ziplist master
Traceback (most recent call last):
  File "/Users/webchick/mongodb-hackathon/gdelttools/gdelttools/gdeltloader.py", line 12, in <module>
    import requests
ModuleNotFoundError: No module named 'requests'

Sorry for my ancient laptop 🤣 but it seems like at the very least we could use a blurb in the README.md that explains the prerequisites are that needed in order for this command to succeed.

jdrumgoole commented 2 years ago

H Angie,

There is a Pipfile that defines the requirements. You can manually install them or use pipenv shell to create a virtual environment that installs them automatically. I will add this to the readme.

Joe.