PyCharm does not recognize from aqt.operations import QueryOp

It seems that PyCharm cannot find from aqt.operations or import QueryOp. Does the aqt package need to be updated?

Maybe the version installed on your system/virtual env is not from the latest Anki.

@dae I updated and still get the same error.

Works for me. As noted in the docs, you need to be using Python 3.9 or 3.10.

@dae Strange. I’m using Python 3.10, but it’s still showing up as not found. At least in works in Anki proper.

I would double check the configuration of your pycharm project’s interpreter to make sure it’s pointing to the python env that you updated Anki in.

Also, if you are using a remote interpreter config in pycharm, the remote sources can get out of sync. There is discussion about that on jetbrains’ issue tracker.

1 Like