If you code Vector via the Python SDK you may know the following problem: if you execute a Python program do do something on or with the robot you get a lot of annoying warnings:
events.EventHandler WARNING Unknown Event type
This is only a warning and can safely be ignored, but it occures a lot and is quite annoying.
You can comment out a line in a Vector Python SDK file to get rid of it. The file you need to correct is called events.py. Where this file exactly is depends on your Python setup and your operating system. But it is quite easy to find the location of the file inside Python from a Python code file for Vector.
Directly after the following line in your Python program that imports the Vector SDK
If you run the program now, the path to the Vector SDK on your computer will be printed in the console. On Windows it may look like this:
So you now know the path where you find events.py:
Open events.py in an editor. You can now either search the code for the String “Unknown Event type” or you go to around line 254 (but the line number may vary from the Anki Python SDK version you are using). Look for the following:
except TypeError: self.logger.warning('Unknown Event type')
except TypeError: #self.logger.warning('Unknown Event type') pass
From now on the annoying warnings in the console will be gone.
Thanks to Colin Twigg who posted a comment in the independend Vector group on Facebook about this that got me on the right track.
I would like to learn python to control vector
Thank you…. ?
Thank you very much ! Very useful with the ikkez version of the SDK.
Thanks, it’s so much nicer.
Fixes a major issue with Vectorator…and it wasn’t Vectorators fault!