Running multiranger_pointcloud.py example

Discussions and questions about the Crazyflie Nano Quadcopter
kristoffer
Bitcraze
Posts: 518
Joined: Tue Jun 30, 2015 7:47 am

Re: Running multiranger_pointcloud.py example

Post by kristoffer »

It is probably related to qt5 or vispy? Vispy is using QT but I'm not sure what the problem is.
Have you tried to upgrade or reinstall vispy and qt5.

You can do it from pip, and since it seems as your ide is using python 3, you should probably use pip3.

on the lines of

Code: Select all

pip3 install vispy
pip3 install PyQt5
boped
Beginner
Posts: 3
Joined: Fri May 15, 2020 3:38 pm

Re: Running multiranger_pointcloud.py example

Post by boped »

Yes I think Qt5 is the Problem. Thanks for replying.
But if i try to install it, this error appears:
pi@raspberry:~ $ pip3 install PyQt5
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting PyQt5
Using cached https://files.pythonhosted.org/packages ... 4.2.tar.gz
Installing build dependencies ... done
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib/python3.7/tokenize.py", line 447, in open
buffer = _builtin_open(filename, 'rb')
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/pip-install-8hyb0_sw/PyQt5/setup.py'

----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-8hyb0_sw/PyQt5/
kristoffer
Bitcraze
Posts: 518
Joined: Tue Jun 30, 2015 7:47 am

Re: Running multiranger_pointcloud.py example

Post by kristoffer »

I'm afraid I can't offer much help, but maybe this is useful https://stackoverflow.com/questions/597 ... ect=1&lq=1
paoloC
Beginner
Posts: 1
Joined: Fri Jun 25, 2021 4:54 am

Re: Running multiranger_pointcloud.py example

Post by paoloC »

Hi I'm running into a similar error as mentioned before but all my modules seem to be installed correctly:
I am running on python 3.9.3, vispy 0.6.6, and PyQt5 5.15.4. Do you know if they have made changes recently to the modules? Searching through vispy's documentation I haven't been able to find the setParent() function that seems to be causing the problem. However, commenting that line out and the following line that sets the central widget results in a blank graph.
jonasdn
Member
Posts: 51
Joined: Mon Mar 01, 2021 3:13 pm

Re: Running multiranger_pointcloud.py example

Post by jonasdn »

It might be similiar to this issue? https://github.com/bitcraze/crazyflie-c ... issues/472 that is at least marked as solved.

Does the same solution work for you?
DM7299
Member
Posts: 31
Joined: Sat Jun 05, 2021 6:04 pm

Re: Running multiranger_pointcloud.py example

Post by DM7299 »

I'm also experiencing this problem, and the issue on the github didn't seem to be relevant. Uninstalling and reinstalling pyqt5 at different versions had no effect on the code's ability to run (aside from making it impossible when the code was not installed). When it is installed, removing the two lines mentioned previously allows the code to run (but without the plotter functioning, though the drone still flies) and with them present I receive the same 'CanvasBackend' object has no attribute 'setParent' error.
arnaud
Bitcraze
Posts: 2501
Joined: Tue Feb 06, 2007 12:36 pm

Re: Running multiranger_pointcloud.py example

Post by arnaud »

This error looks like one we just 'solved with documentation' in the client: https://github.com/bitcraze/crazyflie-c ... n/pull/523

The solution for the client was to install the package libxcb-xinemara0 with
<code>
sudo apt install libxcb-xinerama0
</code>

Maybe this works in that case too?
Post Reply