Windfarer / mongokit-ng

Mongokit (mongodb odm) on Python 3 and based on pymongo 3.9+
MIT License
13 stars 3 forks source link

ImportError: cannot import name 'ALL' from 'pymongo' (Python 3.10, pymongo 4.0) #167

Open justindz opened 2 years ago

justindz commented 2 years ago

Description

Updating a project that uses discord.py and mongokit-ng to use Python 3.10. Created a new venv for the project and installed the latest dependencies, which are mongokit-ng (and therefore pymongo) and discord.py. This increased pymongo from v3 to v4, whereas the mongokit-ng version was previously 0.1.1. The application connects to MongoDB Atlas. The error in the issue title (and below) occurs when running the application.

What I Did

D:\Documents\GitHub\Mines-RPG\venv\Scripts\python.exe D:/Documents/GitHub/Mines-RPG/bot.py
Traceback (most recent call last):
  File "D:\Documents\GitHub\Mines-RPG\bot.py", line 4, in <module>
    from mongokit_ng import Connection
  File "D:\Documents\GitHub\Mines-RPG\venv\lib\site-packages\mongokit_ng\__init__.py", line 43, in <module>
    from pymongo import (
ImportError: cannot import name 'ALL' from 'pymongo' (D:\Documents\GitHub\Mines-RPG\venv\lib\site-packages\pymongo\__init__.py)

Process finished with exit code 1
FredericLeuba commented 1 year ago

Hello. Has the issue been fixed? It occures to me too. Best regards