Not able to import data mflix in mongodb

not able to import data mflix in mongodb, please help

Hi @vithal_60851,

It would be easy for us to debug the issue if you can share the error and screenshot you are getting while importing the data.

  • Please check your connection string in the config file.
  • Check that your firewall is OFF
  • You are able to connect to the atlas cluster from your system.

*NOTE: Also, you need to run mongorestore command from the mflix-python directory.

Kanika

I am getting error when i type the below command
mongorestore --drop --gzip --uri .please find the attachment and guide me.

Thanks,

Vithal

mongodb_error1.PNG

Please run mongorestore command outside the Mongo Shell. You need to run in your command line/terminal directly.

Kanika

Kanika,

Please find the errors screenshots attached and help me our.

Thanks & Regards,

Vithal

mongodb_error1.PNG

image.png

image

i am getting the error if i run the command outside. pls find the error attached.

Hi @vithal_60851,

You are missing the cluster uri to mention in the command. The cluster uri needs to be mentioned so that the command knows where to import data.

To know your CLUSTER_URI, from your atlas account: Overview -> Connect -> Connect Your Application .

Kanika

image

hi i am gettng the error after following your instructions. Please let me know the solutions clearly.

Hi @vithal_60851,

I am sorry if my instructions were not clear. You need to be in mflix-python directory which you might have downloaded from the handouts.

And then run the command mongorestore.

Kanika

image

i ran the command from the mflix-python directory and got the error attached. Please check what is causing the issue

Thanks,
Vithal

There are few things missing:

  • Replace the password in your connection string
  • Add data parameter in the connection string.

Kanika

image
pls find

image

i have included data string but stil getting the error

how to replace the password ,is it mandatory to replace the password.

Hi @vithal_60851,

Please copy paste this into your command line as a single command and run it.

mongorestore --drop --gzip --uri mongodb+srv://m220student:m220password@cluster0-zf0mz.mongodb.net/test data

Respond with a screenshot if it didn’t work.

i did the same but its going no where . nothing is happening over there

Hi @vithal_60851

Could you try doing the same in the Powershell instead of command line?

Please let me know how that goes.

I seem to be having a similar problem:

Annotation%202019-06-20%20194522 Annotation%202019-06-20%20193814

I thought that perhaps on windows there is a limit to the length of a command, and the string is cut in half and processed as two, which would explain the error messages, but online it says that the limit is thousands of characters. In any case, I’m at a loss as to how to proceed.

i tried the same in powershell , but it is not going any where same issue as it is.

Thanks.
Vithal

Can you execute dir or ls command to check what mflix-python directory contains?