Skip to main content
Post Closed as "Duplicate" by Tomerikoo python
formatting imporved.
Source Link
mgc
  • 5.5k
  • 1
  • 28
  • 39

I am trying to import MongoClient class from the pymongo module and getting the below error

Traceback (most recent call last):
  File "pymongo.py", line 3, in <module>
    import pymongo
  File "C:\Users\Iqbal\Desktop\pymongo.py", line 5, in <module>
    client = pymongo.MongoClient()
AttributeError: partially initialized module 'pymongo' has no attribute 'MongoClient' (most likely due to a circular import)

I have installed latest version of pymongo, which is 3.10.1


 import requests
import pymongo

client = pymongo.MongoClient()

I am trying to import MongoClient class from the pymongo module and getting the below error

Traceback (most recent call last):
  File "pymongo.py", line 3, in <module>
    import pymongo
  File "C:\Users\Iqbal\Desktop\pymongo.py", line 5, in <module>
    client = pymongo.MongoClient()
AttributeError: partially initialized module 'pymongo' has no attribute 'MongoClient' (most likely due to a circular import)

I have installed latest version of pymongo, which is 3.10.1


 import requests
import pymongo

client = pymongo.MongoClient()

I am trying to import MongoClient class from the pymongo module and getting the below error

Traceback (most recent call last):
  File "pymongo.py", line 3, in <module>
    import pymongo
  File "C:\Users\Iqbal\Desktop\pymongo.py", line 5, in <module>
    client = pymongo.MongoClient()
AttributeError: partially initialized module 'pymongo' has no attribute 'MongoClient' (most likely due to a circular import)

I have installed latest version of pymongo, which is 3.10.1

import requests
import pymongo

client = pymongo.MongoClient()

I am trying to import MongoClient class from the pymongo module and getting the below error

Traceback (most recent call last): File "pymongo.py", line 3, in import pymongo File "C:\Users\Iqbal\Desktop\pymongo.py", line 5, in client = pymongo.MongoClient() AttributeError: partially initialized module 'pymongo' has no attribute 'MongoClient' (most likely due to a circular import)

Traceback (most recent call last):
  File "pymongo.py", line 3, in <module>
    import pymongo
  File "C:\Users\Iqbal\Desktop\pymongo.py", line 5, in <module>
    client = pymongo.MongoClient()
AttributeError: partially initialized module 'pymongo' has no attribute 'MongoClient' (most likely due to a circular import)

I have installed latest version of pymongo, which is 3.10.1


import requests
import pymongo

client = pymongo.MongoClient()

I am trying to import MongoClient class from the pymongo module and getting the below error

Traceback (most recent call last): File "pymongo.py", line 3, in import pymongo File "C:\Users\Iqbal\Desktop\pymongo.py", line 5, in client = pymongo.MongoClient() AttributeError: partially initialized module 'pymongo' has no attribute 'MongoClient' (most likely due to a circular import)

I have installed latest version of pymongo, which is 3.10.1


import requests
import pymongo

client = pymongo.MongoClient()

I am trying to import MongoClient class from the pymongo module and getting the below error

Traceback (most recent call last):
  File "pymongo.py", line 3, in <module>
    import pymongo
  File "C:\Users\Iqbal\Desktop\pymongo.py", line 5, in <module>
    client = pymongo.MongoClient()
AttributeError: partially initialized module 'pymongo' has no attribute 'MongoClient' (most likely due to a circular import)

I have installed latest version of pymongo, which is 3.10.1


import requests
import pymongo

client = pymongo.MongoClient()
Source Link

Error while importing MongoClient from pymongo module

I am trying to import MongoClient class from the pymongo module and getting the below error

Traceback (most recent call last): File "pymongo.py", line 3, in import pymongo File "C:\Users\Iqbal\Desktop\pymongo.py", line 5, in client = pymongo.MongoClient() AttributeError: partially initialized module 'pymongo' has no attribute 'MongoClient' (most likely due to a circular import)

I have installed latest version of pymongo, which is 3.10.1


import requests
import pymongo

client = pymongo.MongoClient()