- Posts: 85
- Thank you received: 0
ERROR: You must use the PyQt5 bindings
4 years 5 months ago #243312
by tripwire
ERROR: You must use the PyQt5 bindings was created by tripwire
I'm stuck! As far as I know nothing changed (except I did turn off my pc) from when everything was working until I became unable to open any VCP in Qt Designer.
The other strange behavior is that now when I invoke editvcp on the command line, I get a file chooser dialog with no option to create a new vcp.
The main error I got when running editvcp vcptemplate from the command line is the following:
[/code]
The other strange behavior is that now when I invoke editvcp on the command line, I get a file chooser dialog with no option to create a new vcp.
The main error I got when running editvcp vcptemplate from the command line is the following:
Code:
2022-05-18 19:49:49,986 - EditVCP.Designer - INFO - Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
2022-05-18 19:49:50,440 - EditVCP.Designer - INFO - /home/dave/.local/lib/python3.9/site-packages/qtpy/__init__.py:201: RuntimeWarning: Selected binding "pyqt5" could not be found, using "pyside2"
2022-05-18 19:49:50,441 - EditVCP.Designer - INFO - warnings.warn('Selected binding "{}" could not be found, '
2022-05-18 19:49:50,442 - EditVCP.Designer - INFO - ERROR: You must use the PyQt5 bindings in order to use the custom
2022-05-18 19:49:50,442 - EditVCP.Designer - INFO - widgets in QtDesigner.
2022-05-18 19:49:50,495 - EditVCP - INFO - EditVCP finished
The following is the entire output:
[code]2022-05-18 19:49:49,521 - EditVCP - INFO - Logging to /home/dave/qtpyvcp.log
2022-05-18 19:49:49,673 - EditVCP - INFO - Loading YAML config file: /home/dave/vcptemplate/vcptemplate/config.yml
2022-05-18 19:49:49,735 - EditVCP.EditVCP.utilities.config_loader - DEBUG - Loading config files: ['/home/dave/vcptemplate/vcptemplate/config.yml', '/home/dave/dev/qtpyvcp/qtpyvcp/yaml_lib/default_config.yml']
2022-05-18 19:49:49,964 - EditVCP.EditVCP.utilities.config_loader - DEBUG - Merged YAML config:
default_menubar: &id001
- title: File
items:
- title: '&Open ...'
action: win.openFile
shortcut: ctrl+o
- title: '&Recent Files'
provider: qtpyvcp.widgets.recent_files_menu:RecentFilesMenu
- title: '&Reload'
action: program.reload
- title: '&Close'
action: program.clear
- title: Save &As
action: null
- separator
- title: Edit ToolTable
action: win.showDialog
args:
- tool_edit
- separator
- title: Exit
action: app.exit
shortcut: ctrl+q
- title: Machine
items:
- title: Toggle E-Stop
action: machine.estop.toggle
shortcut: F1
- title: Toggle Power
action: machine.power.toggle
shortcut: F2
- separator
- title: Run Program
action: program.run
shortcut: R
- title: Step
action: program.step
shortcut: T
- title: Pause
action: program.pause
shortcut: P
- title: Resume
action: program.resume
shortcut: R
- title: Abort
action: program.abort
shortcut: esc
- title: Optional Stop
action: program.optional_stop.toggle
- title: Optional Skip
action: program.optional_skip.toggle
- separator
- title: Homing
provider: qtpyvcp.widgets.menus.homing_menu:HomingMenu
- title: Cooling
items:
- title: Flood
action: coolant.flood.toggle
shortcut: F7
- title: Mist
action: coolant.mist.toggle
shortcut: F8
- title: Set Work Offsets
action: win.showDialog
args:
- set_work_offsets
- separator
- title: Override Limits
action: machine.override_limits
- title: Settings
items:
- title: Show On-screen Keyboard
action: settings.virtual-input.enable
- title: View
items:
- title: Show Gridlines
action: settings.backplot.show-grid
- separator
- title: Show Machine Bounds
action: settings.backplot.show-machine-bounds
- title: Show Machine Labels
action: settings.backplot.show-machine-labels
- title: Show Machine Ticks
action: settings.backplot.show-machine-ticks
- separator
- title: Show Program Bounds
action: settings.backplot.show-program-bounds
- title: Show Program Labels
action: settings.backplot.show-program-labels
- title: Show Program Ticks
action: settings.backplot.show-program-ticks
- title: Use Colors per Tool
action: settings.backplot.multitool-colors
- separator
- title: Perspective View
action: settings.backplot.perspective-view
- title: View Angle
action: settings.backplot.view
- title: Tools
items:
- title: HAL Meter
action: tool.halmeter
- title: HAL Scope
action: tool.halscope
- title: HAL Show
action: tool.halshow
- title: LCNC Status
action: tool.status
- title: Calibration
action: tool.calibration
- title: Classicladder PLC
action: tool.classicladder
- title: Simulated Probe
action: tool.simulate_probe
- title: About
items:
- title: About QtPyVCP
action: win.showDialog
args:
- about_qtpyvcp
- title: About Qt
action: app.aboutQt
vcp:
name: vcpTemplate
version: v0.0.1
author: My Name
description: "Put a short description of your VCP here. This will be shown in the\
\ VCP Chooser when launching QtPyVCP with the --chooser option.\n\nExamples of\
\ what to included here:\n * VCP Features\n * Type of machine the VCP is for\n\
\ * Development status\n * Acknowledgments"
windows:
mainwindow:
provider: vcptemplate.mainwindow:MyMainWindow
kwargs:
menu: *id001
ui_file: /home/dave/vcptemplate/vcptemplate/ui/mainwindow.ui
stylesheet: null
title: vcpTemplate v0.0.1
data_plugins:
status:
provider: qtpyvcp.plugins.status:Status
kwargs:
cycle_time: 75
persistent_data_manager:
provider: qtpyvcp.plugins.persistent_data_manager:PersistentDataManager
kwargs:
serialization_method: pickle
settings:
provider: qtpyvcp.plugins.settings:Settings
position:
provider: qtpyvcp.plugins.positions:Position
kwargs:
report_actual_pos: true
use_program_units: true
tooltable:
provider: qtpyvcp.plugins.tool_table:ToolTable
offsettable:
provider: qtpyvcp.plugins.offset_table:OffsetTable
notifications:
provider: qtpyvcp.plugins.notifications:Notifications
kwargs:
enabled: true
mode: native
max_messages: 5
persistent: true
file_locations:
provider: qtpyvcp.plugins.file_locations:FileLocations
log_level: debug
kwargs:
default_location: NC Files
local_locations:
Home: ~/
Desktop: ~/Desktop
NC Files: ~/linuxcnc/nc_files
network_locations: null
exportedhal:
provider: qtpyvcp.plugins.exported_hal:ExportedHal
virtual_input:
provider: qtpyvcp.plugins.virtual_input_manager:VirtualInputManager
dialogs:
open_file:
provider: qtpyvcp.widgets.dialogs.open_file_dialog:OpenFileDialog
set_work_offsets:
provider: qtpyvcp.widgets.dialogs.offsets_dialog:OffsetsDialog
tool_edit:
provider: qtpyvcp.widgets.dialogs.tool_edit_dialog:ToolEditDialog
probe_sim:
provider: qtpyvcp.widgets.dialogs.probesim_dialog:ProbeSim
about_qtpyvcp:
provider: qtpyvcp.widgets.dialogs.about_dialog:AboutDialog
virtual_input_providers:
number:
provider: qtpyvcp.widgets.virtual_input.virtual_input:VirtualInput
kwargs:
ui_file: /home/dave/dev/qtpyvcp/qtpyvcp/yaml_lib/../widgets/virtual_input/numpad.ui
text:
provider: qtpyvcp.widgets.virtual_input.virtual_input:VirtualInput
kwargs:
ui_file: /home/dave/dev/qtpyvcp/qtpyvcp/yaml_lib/../widgets/virtual_input/keyboard.ui
application:
provider: qtpyvcp.app.application:VCPApplication
kwargs:
stylesheet: /home/dave/vcptemplate/vcptemplate/ui/style.qss
settings:
touch-probe.diameter-offset:
default_value: 0.123123
persistent: true
min_value: 0
max_value: 1
dro.display-units:
default_value: 0
options:
- Auto
- Inch
- Metric
dro.lathe-radius-mode:
default_value: 0
options:
- Auto
- Radius
- Diameter
dro.inch-format:
default_value: '%9.4f'
value_type: str
dro.millimeter-format:
default_value: '%9.3f'
value_type: str
dro.degree-format:
default_value: '%9.2f'
backplot.show-grid:
default_value: false
backplot.show-program-bounds:
default_value: false
backplot.show-program-labels:
default_value: false
backplot.show-program-ticks:
default_value: false
backplot.show-machine-bounds:
default_value: false
backplot.show-machine-labels:
default_value: false
backplot.show-machine-ticks:
default_value: false
backplot.perspective-view:
default_value: true
backplot.view:
default_value: 0
options:
- 'X: Front View'
- 'XZ: Lathe View'
- 'XZ2: Lathe View'
- 'Y: Front View'
- 'Z: Top View'
- 'Z2: Bottom View'
- 'P: Isometric'
backplot.multitool-colors:
default_value: true
qtdesigner:
ui_file: /home/dave/vcptemplate/vcptemplate/ui/mainwindow.ui
qss_file: /home/dave/vcptemplate/vcptemplate/ui/style.qss
2022-05-18 19:49:49,966 - EditVCP - INFO - Loading UI file: /home/dave/vcptemplate/vcptemplate/ui/mainwindow.ui
2022-05-18 19:49:49,966 - EditVCP - INFO - Loading QSS file: /home/dave/vcptemplate/vcptemplate/ui/style.qss
2022-05-18 19:49:49,966 - EditVCP - INFO - Starting QtDesigner ...
2022-05-18 19:49:49,986 - EditVCP.Designer - INFO - Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
2022-05-18 19:49:50,440 - EditVCP.Designer - INFO - /home/dave/.local/lib/python3.9/site-packages/qtpy/__init__.py:201: RuntimeWarning: Selected binding "pyqt5" could not be found, using "pyside2"
2022-05-18 19:49:50,441 - EditVCP.Designer - INFO - warnings.warn('Selected binding "{}" could not be found, '
2022-05-18 19:49:50,442 - EditVCP.Designer - INFO - ERROR: You must use the PyQt5 bindings in order to use the custom
2022-05-18 19:49:50,442 - EditVCP.Designer - INFO - widgets in QtDesigner.
2022-05-18 19:49:50,495 - EditVCP - INFO - EditVCP finished
Any help would be greatly appreciated!!
Please Log in to join the conversation.
4 years 5 months ago #243379
by tripwire
Replied by tripwire on topic ERROR: You must use the PyQt5 bindings
To try to diagnose the problem, I've placed print statements in the file, /home/dave/.local/lib/python3.9/site-packages/qtpy/__init__.py. I'm showing the state of the "API" variable. As can be seen, it stays set to "pyqt5" before the open file dialog but after I choose (any) vcp to open, you can see the variable change to pyqt6, then pyside2. I don't think it's suppose to do that.
Note: at this point I'm presented with a file open dialog box instead of launching Qt Designer directly.
The following is the output in the terminal after I choose (any) vcp to edit:
I really need to resolve this. Please help. I don't want to reinstall everything...again!
Code:
dave@DavesLinuxMachine:~$ editvcp
(DL Diagnostics line 105 - API = pyqt5
(DL Diagnostics 2- API = pyqt5
(DL Diagnostics line 130 - API = pyqt5
(DL Diagnostics line 132- API = pyqt5
(DL Diagnostics line 156 - API = pyqt5
(DL Diagnostics line 205 - API = pyqt5
The following is the output in the terminal after I choose (any) vcp to edit:
Code:
2022-05-19 18:27:07,391 - EditVCP - INFO - Logging to /home/dave/qtpyvcp.log
2022-05-19 18:27:45,265 - EditVCP - INFO - Loading UI file: /home/dave/vcp1/vcp1/ui/mainwindow.ui
2022-05-19 18:27:45,266 - EditVCP - INFO - Starting QtDesigner ...
2022-05-19 18:27:45,797 - EditVCP.Designer - INFO - /home/dave/.local/lib/python3.9/site-packages/qtpy/__init__.py:207: RuntimeWarning: Selected binding "pyqt5" could not be found, using "pyside2"
2022-05-19 18:27:45,798 - EditVCP.Designer - INFO - warnings.warn('Selected binding "{}" could not be found, '
2022-05-19 18:27:45,799 - EditVCP.Designer - INFO - (DL Diagnostics line 105 - API = pyqt5
2022-05-19 18:27:45,799 - EditVCP.Designer - INFO - (DL Diagnostics 2- API = pyqt5
2022-05-19 18:27:45,799 - EditVCP.Designer - INFO - (DL Diagnostics line 130 - API = pyqt5
2022-05-19 18:27:45,799 - EditVCP.Designer - INFO - (DL Diagnostics line 156 - API = pyqt6
2022-05-19 18:27:45,799 - EditVCP.Designer - INFO - (DL Diagnostics line 167 - API = pyside2
2022-05-19 18:27:45,799 - EditVCP.Designer - INFO - (DL Diagnostics line 205 - API = pyside2
2022-05-19 18:27:45,800 - EditVCP.Designer - INFO - ERROR: You must use the PyQt5 bindings in order to use the custom
2022-05-19 18:27:45,800 - EditVCP.Designer - INFO - widgets in QtDesigner.
2022-05-19 18:27:45,853 - EditVCP - INFO - EditVCP finished
dave@DavesLinuxMachine:~$
I really need to resolve this. Please help. I don't want to reinstall everything...again!
Please Log in to join the conversation.
4 years 5 months ago #243381
by TurBoss
Replied by TurBoss on topic ERROR: You must use the PyQt5 bindings
hello
could you try to install python3-pyqt5
thanks
could you try to install python3-pyqt5
thanks
Please Log in to join the conversation.
4 years 5 months ago #243393
by tripwire
Replied by tripwire on topic ERROR: You must use the PyQt5 bindings
Thanks for the suggestion, TurBoss but it didn't change anything. Here is the result:
Before your suggestion, I had actually uninstalled python3-pyqt5 and then reinstalled it. When it was uninstalled, Qt Designer opened normally but didn't contain any of the VCP widgets. Reinstalling python3-pyqt5 didn't change the errors I was getting.
I realize I may have improperly shut down my computer which may have caused the problem. Does this fact give you any other ideas?
Thanks!
Code:
dave@DavesLinuxMachine:~$ sudo apt-get install python3-pyqt5
[sudo] password for dave:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
python3-pyqt5 is already the newest version (5.15.2+dfsg-3).
0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.
dave@DavesLinuxMachine:~$
Before your suggestion, I had actually uninstalled python3-pyqt5 and then reinstalled it. When it was uninstalled, Qt Designer opened normally but didn't contain any of the VCP widgets. Reinstalling python3-pyqt5 didn't change the errors I was getting.
I realize I may have improperly shut down my computer which may have caused the problem. Does this fact give you any other ideas?
Thanks!
Please Log in to join the conversation.
4 years 5 months ago #243394
by TurBoss
Replied by TurBoss on topic ERROR: You must use the PyQt5 bindings
can you please check if the pyqt5 libraries got installed
github.com/kcjengr/qtpyvcp/tree/master/p...15.2-64bit/python3.9
thanks
github.com/kcjengr/qtpyvcp/tree/master/p...15.2-64bit/python3.9
thanks
Please Log in to join the conversation.
4 years 5 months ago #243444
by tripwire
Replied by tripwire on topic ERROR: You must use the PyQt5 bindings
I will check that out, thanks!
Please Log in to join the conversation.
4 years 5 months ago #243457
by tripwire
Replied by tripwire on topic ERROR: You must use the PyQt5 bindings
I did the following but it didn't change the behaviour:
/home/dave/.local/lib/python3.9/site-packages/qtpy/__init__.py file which is where an exception is thrown and this causes the API var to change from pyqt5 to pyqt6 and then pyside2.
I realize it's a lot to dig into but I'd be curious as to why that exception is thrown.
Code:
dave@DavesLinuxMachine:~/dev/qtpyvcp/pyqt5designer/Qt5.15.2-64bit/python3.9$ sudo ./install.sh
[sudo] password for dave:
renaming existing libpyqt5.so to libpyqt5.so.old
copying libpyqt5.so for python 3.9 to /usr/lib/x86_64-linux-gnu/qt5/plugins/designer
dave@DavesLinuxMachine:~/dev/qtpyvcp/pyqt5designer/Qt5.15.2-64bit/python3.9$
Note that my vcp runs fine when launched from linuxcnc. So I must have the pyqt5 libraries.
I've attached the
I realize it's a lot to dig into but I'd be curious as to why that exception is thrown.
Attachment not found
Please Log in to join the conversation.
4 years 5 months ago #243501
by TurBoss
Replied by TurBoss on topic ERROR: You must use the PyQt5 bindings
can you try to run
Code:
python3.9 -m pip install pyqt5
thanks
Please Log in to join the conversation.
4 years 5 months ago #243528
by tripwire
Replied by tripwire on topic ERROR: You must use the PyQt5 bindings
thanks for hanging in there with me, TurBoss.
I will give your suggestion a try.
I will give your suggestion a try.
Please Log in to join the conversation.
4 years 5 months ago #243638
by tripwire
Replied by tripwire on topic ERROR: You must use the PyQt5 bindings
I tried. Here is the result. I still have the same problem.
Code:
dave@DavesLinuxMachine:~$ which python3.9
/usr/bin/python3.9
dave@DavesLinuxMachine:~$ python3.9 -m pip install pyqt5
Requirement already satisfied: pyqt5 in /usr/local/lib/python3.9/dist-packages (5.15.4)
Requirement already satisfied: PyQt5-Qt5>=5.15 in /usr/local/lib/python3.9/dist-packages (from pyqt5) (5.15.2)
Requirement already satisfied: PyQt5-sip<13,>=12.8 in /usr/lib/python3/dist-packages (from pyqt5) (12.8.1)
Please Log in to join the conversation.
Time to create page: 0.183 seconds
