Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] cannot import name '_QUERY_OPTIONS' from 'pymongo.cursor' #577

Open
SuperJinggg opened this issue Jan 13, 2025 · 0 comments
Open

[BUG] cannot import name '_QUERY_OPTIONS' from 'pymongo.cursor' #577

SuperJinggg opened this issue Jan 13, 2025 · 0 comments
Labels
scope: general Any general related status: triage type: bug Something isn't working

Comments

@SuperJinggg
Copy link

What command did you use to create the bug? (if relevant)

No response

Describe the Bug

Sorry, I ran the code for the first time according to the docs and got an error, modified the config.env file as per the docs, and then used the command "python3 -m pip install." Install the dependencies, and finally run the error, this bug seems to be a dependency problem, is the dependency version you gave right?

Step to Reproduce

python3.12
pymongo=4.10.1
windows
anaconda

Expected Behavior

Normal operation

Logs (if any)

Traceback (most recent call last):
  File "C:\Users\yangj\Desktop\Anjani\anjani\__main__.py", line 17, in <module>
    from anjani import main
  File "C:\Users\yangj\Desktop\Anjani\anjani\main.py", line 29, in <module>
    from .core import Anjani
  File "C:\Users\yangj\Desktop\Anjani\anjani\core\__init__.py", line 17, in <module>
    from .anjani_bot import Anjani  # skipcq: PY-W2000
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\yangj\Desktop\Anjani\anjani\core\anjani_bot.py", line 24, in <module>
    from anjani.util.config import Config
  File "C:\Users\yangj\Desktop\Anjani\anjani\util\__init__.py", line 17, in <module>
    from . import (  # skipcq: PY-W2000
  File "C:\Users\yangj\Desktop\Anjani\anjani\util\db\__init__.py", line 17, in <module>
    from .client import AsyncClient  # skipcq: PY-W2000
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\yangj\Desktop\Anjani\anjani\util\db\client.py", line 49, in <module>
    from .command_cursor import AsyncCommandCursor, CommandCursor
  File "C:\Users\yangj\Desktop\Anjani\anjani\util\db\command_cursor.py", line 41, in <module>
    from .cursor_base import AsyncCursorBase
  File "C:\Users\yangj\Desktop\Anjani\anjani\util\db\cursor_base.py", line 35, in <module>
    from pymongo.cursor import _QUERY_OPTIONS, Cursor, RawBatchCursor
ImportError: cannot import name '_QUERY_OPTIONS' from 'pymongo.cursor' (C:\Users\yangj\.conda\envs\tg\Lib\site-packages\pymongo\cursor.py)
@SuperJinggg SuperJinggg added scope: general Any general related status: triage type: bug Something isn't working labels Jan 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: general Any general related status: triage type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant