Problem with mongodbimport script

I’m following one of the sessions for the hackathon and trying to use the mongoimport.sh script that is in available via gdeltools to put the data in my cluster , but nothing is happening after I run the command in my terminal, and my database is still empty meaning no data was imported into it.

I’m using a Windows PC and running the command in Powershell (in Visual Studio Code).
Here’s the command I’m running: ./mongoimport.sh --uri "MY CONNECTION STRING"

1 Like

@Mark_Smith kindly help

1 Like

I used the script today and this is how it worked for me

  1. clone the repository
  2. make (the make will also run a test so examine the output for errors.
  3. In the file with the zip files (remove the CSV) run the mongoimportsh as in …/folder/mongoimport.sh

Btw I enjoyed your presentation

2 Likes

Hey @Fiewor_John - sorry to hear you’ve been having trouble with this. The mongoimport.sh script is written to run on Linux - so you could run it in WSL on Windows, if you have that set up. Otherwise I can look at translating it to Powershell - I’ll have a look at this today, as I’m sure you’re not the only one who needs this.

It’s also worth noting that you need to have the .CSV files in your current directory when running the script.

Earlier versions of mongoimport.sh required you to have the CSV files in the same directory as mongoimport.sh, but as long as you have checked out the latest copy, you shouldn’t need that any more, but the first line of this comment is still true.

1 Like

Thank you, but the make command (which I have just installed) isn’t working as expected
I’ll use WSL as Mark suggested.
Also, thank you for the comment about my presentation :smiley:

@Mark_Smith I keep getting this error while trying to use gdeltloader on my Ubuntu (on WSL)

I’ve tried uninstalling and re-installing gdelttools but nothing’s changed.

My Python version is 3.8.10 and Ubuntu 20.04.4 LTS.

CC @Ilan_Toren

1 Like

Look at the github for gdelttools. Perhaps if you pip in the dependency your code will run.

pip insta

You can confirm your install with

gdeltloader --version

1 Like

Thanks for trying to help. Unfortunately, nothing is still working.
I think you meant pip install ?
Thank you once again

Well, I am a macos user, and since I’m not using the system default python 2.0 and can’t replace it completely I have python3 and pip3 for my work code. Sometime around Catalina, I tried to dump 2.x and I had to make a speedy retreat. I only really use python in combination with Compass or with tensorflow anyway.

1 Like

Thanks for letting us know about this @Fiewor_John. This is a bug that’s been introduced in a recent version of gdeltloader - it looks like it no longer works with Python 3.8.

I’ll fix the bug, but it’ll take a little while to publish. In the meantime, you can update to Python 3.10 to fix this problem. I’m sorry about this!

My friend Ben has described how to use the deadsnakes repo to install different versions of Python

@Mark_Smith

3 Likes

Thank you. Updating to Python 3.10 as suggested worked.

2 Likes

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.