Ticket: Connection pytest -m connection

Need Help.

Seems like there is some issue while importing the data. It seems incomplete. Please try running mongorestore command again and let me know how it goes.

Kanika

I have but i think problem remains same.

I can see the total number of documents is 45993. Can you run the test again and please send the error lines screenshot like I quoted in my previous comment?

Kanika

I do not see any error but anyway see the screenshot

39 items get deselected automatically

Need Help! I am stuck.

Hello Kanika, I have similar issue.
Dont know how to clear this up.

this is my .ini file looks like

So i am in the mflix-python directory and i activated the virtual enviornment
When i run this -> pytest -m connection
I have this following output:

4 failed tests in red are as below:

E pymongo.errors.ServerSelectionTimeoutError: mflix-shard-00-00-ly12n.mongodb.net:27017: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1056),mflix-shard-00-01-ly12n.mongodb.net:27017: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1056),mflix-shard-00-02-ly12n.mongodb.net:27017: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1056)
mflix_venv/lib/python3.7/site-packages/pymongo/topology.py:199: ServerSelectionTimeoutError

certificate verify failed: unable to get local issuer certificate (_ssl.c:1056)
How to i fix this?
Is this something i missed at setup process ?

I am not sure where did i miss any config or setup.
Can anyone please help.!!

Hi @nitinmalgari,

Please check out the below post and let me know if that helps!

Kanika

Hi @Shakeeb_58442,

Sorry for the delayed response. I have never seen this error before. Lets figure this out.
Please share the following information:

  • Which Python version are you using?
  • Your OS details - Windows - 32 bit or 64 bit?
  • Is Firewall Enabled?
  • Is any anti-virus enabled?
  • Are you able to connect. to your cluster through mongo shell?

Moreover, I found these links online that can help:

https://docs.pytest.org/en/latest/warnings.html

Kanika

Python Version - 3.6.6rc1
OS - Windows 64bit
Firewall is enable
Antivirus is not enable
Yes i am able to connect my cluster through mongo shell

Hey Kanika Thank you soo much, That worked.!!

Looks like this is Operating system specified problem.
for certificate verify failed: unable to get local issuer certificate (_ssl.c:1056)
I did the following on my MacOS.

cd /Applications/Python\ 3.7/
./Install\ Certificates.command

And it fixed it.

1 Like

Glad to hear @nitinmalgari! :slight_smile:

Kanika

i am facing this issue

Hi @laxmi_51996,

Please download the project again and then try.

Kanika

and how to do that, can someone help me with the step by step process , not really getting the hang of it

Hi @laxmi_51996,

Let me try if this can help you:

  1. Download handouts specifically: mflix-python.zip.

  2. Extract the zip folder and you will be having mflix-python directory now.

  3. Install Anaconda for your OS mentioned in README Lecture.

  4. Activate the environment.

  5. Install Python dependencies:

    mflix-python > pip install -r requirements.txt
    
  6. Install MongoDB

  7. Create Atlas cluster/ Re-use the same one

  8. Import Data into your cluster

  9. Update .ini file according to your OS.

  10. Then run python run.py

I believe detailed information for steps are mentioned very clearly in README, but do let me know if you face any trouble.

Kanika

enable the “conda” command in Terminal

echo “. /anaconda3/etc/profile.d/conda.sh” >> ~/.bash_profile
source ~/.bash_profile

i am not able to run this command , i am running it in command prompt , is that right

Right!

Please send the screenshot.

Kanika

when i run pip install -r requirements.txt command, i get this error