Cannot find reference in Olympe

Hello everyone,

I am currently developing my thesis with a Parrot Anafi 4k drone.

I am programming in Python with Olympe and whenever I try to import stuff from the SDK, it tells me that it cannot find the references, so it’s all underlined in red. Here is a picture:

I am on ubuntu 22.04 but it wouldn’t work on 20.04, and 24.04 either. My IDE is PyCharm. I created a virtual environment and installed Olympe with pip, just like in the instructions. My Python version is 3.10.12, but I have also tried different ones.

I know that the Anafi 4k is quite old by now and also not officially supported anymore, but the drone actually works fine with the code. I can fly it, I get a video stream and so on. It still confuses me, why the IDE tells me that it can’t find the references. Did anyone have the same problem and fixed it? Please Help!

Kind Regards

Hello Maximilian,
Do not worry about those linking issues, it is an IDE response to the fact that our messages/enums are auto generated, and not physically present to the path they’re mentioned in :wink: It’s inherent to the way we build
If they annoy you too much, you can always # ignore the reportMissingImport Pylance issue at the end of each line, or keep them red

Hello Meryl,

Thank you very much! Yes the Code works anyway. I was just wondering.

But at least now I have an explanation for my professor to why all of the imports are red. This also helps me not worrying anymore.

Kind regards
Maximilian

1 Like