Page 1 of 1

Cfclient installation issue

Posted: Sun Jul 11, 2021 5:47 am
by yeokiwi
Hi,

I encountered the following error when I attempted to run cfclient. I followed the instructions in https://www.bitcraze.io/documentation/r ... stallation

Whichever way, by running pip3 install cfclient or install from source, i will encounter the following runtime issue.

o:~$ cfclient
INFO:cfclient.gui:Disabling STL printouts
INFO:cfclient.utils.input.inputreaders:Input readers: ['linuxjsdev', 'pysdl2']
INFO:cfclient.utils.input.inputreaders:Successfully initialized [linuxjsdev]
INFO:cfclient.utils.input.inputreaders:Could not initialize [pysdl2]: No SDL2 support on Linux
INFO:cfclient.utils.input.inputinterfaces:Found interfaces: ['leapmotion', 'wiimote', 'zmqpull']
INFO:cfclient.utils.input.inputinterfaces:Could not initialize [leapmotion]: Leap Motion library probably not installed (No module named 'leapsdk')
INFO:cfclient.utils.input.inputinterfaces:Could not initialize [wiimote]: Missing cwiid (wiimote) driver No module named 'cwiid'
INFO:cfclient.utils.config:Dist config read from /home/o/.local/lib/python3.8/site-packages/cfclient/configs/config.json
INFO:cfclient.utils.input.inputinterfaces:Could not initialize [zmqpull]: ZMQ input disabled in config file
===== 2021.07.11 13:07:34 =====
Traceback (most recent call last):
File "/home/o/.local/bin/cfclient", line 8, in <module>
sys.exit(main())
File "/home/o/.local/lib/python3.8/site-packages/cfclient/gui.py", line 164, in main
from .ui.main import MainUI
File "/home/o/.local/lib/python3.8/site-packages/cfclient/ui/main.py", line 34, in <module>
import cfclient.ui.tabs
File "/home/o/.local/lib/python3.8/site-packages/cfclient/ui/tabs/__init__.py", line 41, in <module>
from .locopositioning_tab import LocoPositioningTab
File "/home/o/.local/lib/python3.8/site-packages/cfclient/ui/tabs/locopositioning_tab.py", line 40, in <module>
from PyQt5.QtGui import QMessageBox
ImportError: cannot import name 'QMessageBox' from 'PyQt5.QtGui' (/home/o/.local/lib/python3.8/site-packages/PyQt5/QtGui.abi3.so)
o:~$

Re: Cfclient installation issue

Posted: Sun Jul 11, 2021 6:22 am
by yeokiwi
After some troubleshooting,

I need to edit the following in locopositioning_tab.py
from PyQt5.QtGui import QMessageBox
from PyQt5.QtGui import QLabel

to
from PyQt5.QtWidgets import QMessageBox
from PyQt5.QtWidgets import QLabel

for the cfclient to run.

Apparently, it only happened on my newly installed environment... weird.

Rgds

yeokiwi wrote: Sun Jul 11, 2021 5:47 am Hi,

I encountered the following error when I attempted to run cfclient. I followed the instructions in https://www.bitcraze.io/documentation/r ... stallation

Whichever way, by running pip3 install cfclient or install from source, i will encounter the following runtime issue.

o:~$ cfclient
INFO:cfclient.gui:Disabling STL printouts
INFO:cfclient.utils.input.inputreaders:Input readers: ['linuxjsdev', 'pysdl2']
INFO:cfclient.utils.input.inputreaders:Successfully initialized [linuxjsdev]
INFO:cfclient.utils.input.inputreaders:Could not initialize [pysdl2]: No SDL2 support on Linux
INFO:cfclient.utils.input.inputinterfaces:Found interfaces: ['leapmotion', 'wiimote', 'zmqpull']
INFO:cfclient.utils.input.inputinterfaces:Could not initialize [leapmotion]: Leap Motion library probably not installed (No module named 'leapsdk')
INFO:cfclient.utils.input.inputinterfaces:Could not initialize [wiimote]: Missing cwiid (wiimote) driver No module named 'cwiid'
INFO:cfclient.utils.config:Dist config read from /home/o/.local/lib/python3.8/site-packages/cfclient/configs/config.json
INFO:cfclient.utils.input.inputinterfaces:Could not initialize [zmqpull]: ZMQ input disabled in config file
===== 2021.07.11 13:07:34 =====
Traceback (most recent call last):
File "/home/o/.local/bin/cfclient", line 8, in <module>
sys.exit(main())
File "/home/o/.local/lib/python3.8/site-packages/cfclient/gui.py", line 164, in main
from .ui.main import MainUI
File "/home/o/.local/lib/python3.8/site-packages/cfclient/ui/main.py", line 34, in <module>
import cfclient.ui.tabs
File "/home/o/.local/lib/python3.8/site-packages/cfclient/ui/tabs/__init__.py", line 41, in <module>
from .locopositioning_tab import LocoPositioningTab
File "/home/o/.local/lib/python3.8/site-packages/cfclient/ui/tabs/locopositioning_tab.py", line 40, in <module>
from PyQt5.QtGui import QMessageBox
ImportError: cannot import name 'QMessageBox' from 'PyQt5.QtGui' (/home/o/.local/lib/python3.8/site-packages/PyQt5/QtGui.abi3.so)
o:~$

Re: Cfclient installation issue

Posted: Mon Jul 12, 2021 3:01 pm
by kimberly
Interesting! Probably good to make an issue out of this.

In which OS did you run this (window/linux/mac)? and which version of python do you have?

Re: Cfclient installation issue

Posted: Wed Jul 14, 2021 3:03 am
by absfd
I had this issue when installing on windows, I needed to change locopositioning_tab.py as well as lighthouse_tab.py from from PyQt5.QtGui import QMessageBox to from PyQt5.QtWidgets import QMessageBox

Re: Cfclient installation issue

Posted: Wed Jul 14, 2021 1:04 pm
by kimberly
Windows is not the only problem here... we also saw this on linux as well.

Currently we are working on a new release of the cfclient, so try again reinstalling it at the end of this week!

Re: Cfclient installation issue

Posted: Wed Jul 14, 2021 1:05 pm
by kimberly
perhaps this was related?

Re: Cfclient installation issue

Posted: Wed Jul 14, 2021 2:15 pm
by yeokiwi
absfd wrote: Wed Jul 14, 2021 3:03 am I had this issue when installing on windows, I needed to change locopositioning_tab.py as well as lighthouse_tab.py from from PyQt5.QtGui import QMessageBox to from PyQt5.QtWidgets import QMessageBox
Oh yes.. lighthouse_tab.py too.

And yes, they are related.
Windows is not the only problem here... we also saw this on linux as well.

Currently we are working on a new release of the cfclient, so try again reinstalling it at the end of this week!
Great!

Re: Cfclient installation issue

Posted: Thu Jul 15, 2021 1:45 pm
by arnaud
This is now fixed. It was a bug that only recently started causing problem.

I have pushed the fix yesterday to github and release the client 2021.6.1 today. so both "pip3 install cfclient" and "pip3 install -e ." from source should work now.