Running multiranger_pointcloud.py example
Running multiranger_pointcloud.py example
I'm having problems to run multiranger_pointcloud.py example, Do I need to use an specific version of python or vispy?
I'm getting this error: AttributeError: 'CanvasBackend' object has no attribute 'setParent'
If I comment these 2 lines, I'm able to run the script but I cannot visualize the datapoints:
#self.canvas.native.setParent(self)
#self.setCentralWidget(self.canvas.native)
Do you any idea on what can be the problem and how can I fix it?
I'm getting this error: AttributeError: 'CanvasBackend' object has no attribute 'setParent'
If I comment these 2 lines, I'm able to run the script but I cannot visualize the datapoints:
#self.canvas.native.setParent(self)
#self.setCentralWidget(self.canvas.native)
Do you any idea on what can be the problem and how can I fix it?
Re: Running multiranger_pointcloud.py example
Yes this sound like a version issue. Are you running the example with python2 or python3? I'm not sure it works with python2.
Re: Running multiranger_pointcloud.py example
I'm using python 3.5.2. Do I need an specific version for vispy?
Re: Running multiranger_pointcloud.py example
I'm running python 3.7.5 and it works for me but after smaller investigation it seams to be a Qt issue. They broke the API at some point but looks fixed now. Easiest solution is probably to update everything rather then downgrading Qt.
Re: Running multiranger_pointcloud.py example
I'm using ubuntu right now. When you say update everything, do you mean run "app-get update" and install python 3.7.5?
Re: Running multiranger_pointcloud.py example
You could try "app-get update" but it depends on what Ubuntu version (e.g. 19.04) you are on. Possible, at the version you have, 3.5.2 might be the latest.
Re: Running multiranger_pointcloud.py example
Thanks @tobias I was able to run it with python 3.7.5.
Re: Running multiranger_pointcloud.py example
Hallo,
I have the same Problem:
AttributeError: 'CanvasBackend' object has no attribute 'seParent'
You said its a Problem with the Verison of Python. I run it on a rasberry and have python 2.7.16 and
python 3.7.3. How can i know on wich version the programm runs? Or simply how can I solve the problem?
Thanks a lot
boped
I have the same Problem:
AttributeError: 'CanvasBackend' object has no attribute 'seParent'
You said its a Problem with the Verison of Python. I run it on a rasberry and have python 2.7.16 and
python 3.7.3. How can i know on wich version the programm runs? Or simply how can I solve the problem?
Thanks a lot
boped
-
- Bitcraze
- Posts: 630
- Joined: Tue Jun 30, 2015 7:47 am
Re: Running multiranger_pointcloud.py example
I think it is more likely that it is related to vispy rather than python, and that different python versions may not use the same version of vispy.
if you run you can see which version you use of python.
Is there any more information in the error message that you can share? A callstack?
if you run
Code: Select all
python --version
Is there any more information in the error message that you can share? A callstack?
Re: Running multiranger_pointcloud.py example
if I run:
it says: Python 2.7.16
and if i run :
it says: Python 3.7.3
But the Idel Shell says 3.7.3 so I think its not a version problem, too.
Here is the full message of Idle:
Thanks for helping!
Code: Select all
python --version
and if i run :
Code: Select all
python3 --version
But the Idel Shell says 3.7.3 so I think its not a version problem, too.
Here is the full message of Idle:
The code is the example from the crazyflie-lib-python-master "multiranger_pointcloud">>>
RESTART: /home/pi/Desktop/crazyflie-lib-python-master/crazyflie-lib-python-master/examples/multiranger_pointcloud.py
WARNING: Although PyQt5 is already imported, the PyQt5 backend could not
be used ("cannot import name 'QtOpenGL' from 'PyQt5' (/usr/lib/python3/dist-packages/PyQt5/__init__.py)").
Note that running multiple GUI toolkits simultaneously can cause side effects.
WARNING:vispy:Although PyQt5 is already imported, the PyQt5 backend could not
be used ("cannot import name 'QtOpenGL' from 'PyQt5' (/usr/lib/python3/dist-packages/PyQt5/__init__.py)").
Note that running multiple GUI toolkits simultaneously can cause side effects.
Traceback (most recent call last):
File "/home/pi/Desktop/crazyflie-lib-python-master/crazyflie-lib-python-master/examples/multiranger_pointcloud.py", line 363, in <module>
win = MainWindow(URI)
File "/home/pi/Desktop/crazyflie-lib-python-master/crazyflie-lib-python-master/examples/multiranger_pointcloud.py", line 101, in __init__
self.canvas.native.setParent(self)
AttributeError: 'CanvasBackend' object has no attribute 'setParent'
>>>
Thanks for helping!