On 1/11/23 09:06, Chris Morley wrote:
I looked at the qt camview problem. I have an installed version of linuxcnc and
it is broken there.
Strangley I can not find where it got broken in the source.
The fix is easy
In camview.py need to change to these lines.
try:
import cv2 as CV
DEFAULT_API = CV.CAP_ANY
except:
LOG.error('Qtvcp Error with camview - is python3-opencv installed?')
LIB_GOOD = False
DEFAULT_API = 0 # CV.CAP_ANY
This changed things so at least I get a meaningfull error dialog on the
terminal lcnc was launched from:
[QTvcp.QTVCP.QT_ISTAT][WARNING] Embeded tab configuration -invalaid
number of TAB_NAMES vrs TAB_LOCATION - guessng default. (qt_istat.py:414)
[QTvcp][INFO] Logging to: /home/gene/qtvcp.log (logger.py:67)
[QTvcp][INFO] Base log level set to: 10 (logger.py:68)
[QTvcp.QTVCP.QT_PSTAT][DEBUG] BASEPATH cam_align (qt_pstat.py:89)
[QTvcp.QTVCP.QT_PSTAT][DEBUG] Checking for handler file in:
/home/gene/linuxcnc/configs/GO704-5i25-7i76-camera/cam_align_handler.py
(qt_pstat.py:99)
[QTvcp.QTVCP.QT_PSTAT][DEBUG] Checking for default handler file in:
/usr/share/qtvcp/panels/cam_align/cam_align_handler.py (qt_pstat.py:105)
[QTvcp.QTVCP.QT_PSTAT][INFO] Using DEFAULT handler file path:
/usr/share/qtvcp/panels/cam_align/cam_align_handler.py (qt_pstat.py:108)
[QTvcp.QTVCP.QT_PSTAT][DEBUG] Checking for .ui in:
/home/gene/linuxcnc/configs/GO704-5i25-7i76-camera/cam_align.ui
(qt_pstat.py:126)
[QTvcp.QTVCP.QT_PSTAT][DEBUG] Checking for .ui in:
/usr/share/qtvcp/panels/cam_align/cam_align.ui (qt_pstat.py:131)
[QTvcp.QTVCP.QT_PSTAT][INFO] Using DEFAULT ui file from:
/usr/share/qtvcp/panels/cam_align/cam_align.ui (qt_pstat.py:133)
[QTvcp.QTVCP.QT_PSTAT][DEBUG] Checking for .qss in:
/home/gene/linuxcnc/configs/GO704-5i25-7i76-camera/cam_align.qss
(qt_pstat.py:163)
[QTvcp.QTVCP.QT_PSTAT][DEBUG] Checking for .qss in:
/usr/share/qtvcp/panels/cam_align/cam_align.qss (qt_pstat.py:168)
[QTvcp.QTVCP.QT_PSTAT][INFO] No qss file found. (qt_pstat.py:174)
[QTvcp.QTVCP.QT_PSTAT][DEBUG] Checking for .qrc in:
/home/gene/linuxcnc/configs/GO704-5i25-7i76-camera/cam_align.qrc
(qt_pstat.py:185)
[QTvcp.QTVCP.QT_PSTAT][DEBUG] Checking for .qrc in:
/usr/share/qtvcp/panels/cam_align/cam_align.qrc (qt_pstat.py:191)
[QTvcp.QTVCP.QT_PSTAT][INFO] No qrc file found. (qt_pstat.py:198)
[QTvcp.QTVCP.QT_PSTAT][DEBUG] Checking for resources.py in:
/home/gene/linuxcnc/configs/GO704-5i25-7i76-camera/qtvcp/panels/resources.py
(qt_pstat.py:208)
[QTvcp.QTVCP.QT_PSTAT][INFO] No resources.py file found, no QRC file to
compile one from. (qt_pstat.py:219)
[QTvcp.QTVCP.QT_PSTAT][DEBUG] Checking for translation file in:
/home/gene/linuxcnc/configs/GO704-5i25-7i76-camera/cam_align/languages/cam_align_en.qm
(qt_pstat.py:226)
[QTvcp.QTVCP.QT_PSTAT][DEBUG] Checking for translation file in:
/usr/share/qtvcp/screens/cam_align/languages/cam_align_en.qm
(qt_pstat.py:231)
[QTvcp.QTVCP.QT_PSTAT][INFO] Using no translations, default system
locale is: en (qt_pstat.py:236)
[QTvcp][INFO] Building A VCP Panel with: Python 3 (qtvcp:215)
[QTvcp][INFO] No handler file specified - using:
/usr/share/qtvcp/panels/cam_align/cam_align_handler.py (qtvcp:218)
[QTvcp.QTVCP.QT_MAKEGUI][INFO] Qsettings file path:
/home/gene/.config/QtVcp/cam_align.conf (qt_makegui.py:97)
[QTvcp][DEBUG] Loading the handler file. (qtvcp:276)
[QTvcp.QTVCP.QT_MAKEGUI][DEBUG] Adding import dir:
/usr/share/qtvcp/panels/cam_align (qt_makegui.py:290)
[QTvcp.QTVCP.QT_MAKEGUI][DEBUG] Module 'cam_align_handler' imported OK
(qt_makegui.py:301)
[QTvcp.QTVCP.QT_MAKEGUI][DEBUG] Module 'cam_align_handler' :
'get_handlers' function found. (qt_makegui.py:307)
[QTvcp.QTVCP.QT_MAKEGUI][DEBUG] Registering handlers in module
cam_align_handler object <cam_align_handler.HandlerClass object at
0x7f77c066c710> (qt_makegui.py:317)
[QTvcp.QTVCP.QT_MAKEGUI][DEBUG] Register callback 'call_user_command_'
(qt_makegui.py:326)
[QTvcp.QTVCP.QT_MAKEGUI][DEBUG] Register callback 'initialized__'
(qt_makegui.py:326)
[QTvcp][DEBUG] Adding the key events filter. (qtvcp:286)
[QTvcp.QTVCP.QT_MAKEGUI][INFO] No resource file to load: None
(qt_makegui.py:192)
[QTvcp.QTVCP.QT_MAKEPINS][INFO] QTVCP: Found external qtvcp -d panel to
instantiate (qt_makepins.py:87)
[QTvcp][CRITICAL] Aborted from Error Dialog
Qtvcp encountered an error. The following information may be useful
in troubleshooting:
LinuxCNC Version : 2.10.0-pre0-483-g47f4f07e2
Traceback (most recent call last):
File "/usr/bin/qtvcp", line 511, in <module>
APP = QTVCP()
File "/usr/bin/qtvcp", line 304, in __init__
self.panel = qt_makepins.QTPanel(self.hal, PATH, window, opts.debug)
File "/usr/lib/python3/dist-packages/qtvcp/qt_makepins.py", line 96,
in __init__
window[pName].instance(os.path.join(path.PANELDIR , cmd, cmd+'.ui'))
File "/usr/lib/python3/dist-packages/qtvcp/qt_makegui.py", line 382,
in instance
instance = uic.loadUi(filename, self)
File "/usr/lib/python3/dist-packages/PyQt5/uic/__init__.py", line
226, in loadUi
return DynamicUILoader(package).loadUi(uifile, baseinstance,
resource_suffix)
File "/usr/lib/python3/dist-packages/PyQt5/uic/Loader/loader.py",
line 72, in loadUi
return self.parse(filename, resource_suffix, basedir)
File "/usr/lib/python3/dist-packages/PyQt5/uic/uiparser.py", line
1013, in parse
document = parse(filename)
File "/usr/lib/python3.7/xml/etree/ElementTree.py", line 1197, in parse
tree.parse(source, parser)
File "/usr/lib/python3.7/xml/etree/ElementTree.py", line 587, in parse
source = open(source, "rb")
FileNotFoundError: [Errno 2] No such file or directory:
'/usr/share/qtvcp/panels/-d/-d.ui'
(qtvcp:503)
'QTVCP' object has no attribute 'panel'
'QTVCP' object has no attribute 'panel'
Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/bin/qtvcp", line 504, in excepthook
self.shutdown()
File "/usr/bin/qtvcp", line 462, in shutdown
self.panel.window.sync_qsettings()
AttributeError: 'QTVCP' object has no attribute 'panel'
Original exception was:
Traceback (most recent call last):
File "/usr/bin/qtvcp", line 511, in <module>
APP = QTVCP()
File "/usr/bin/qtvcp", line 304, in __init__
self.panel = qt_makepins.QTPanel(self.hal, PATH, window, opts.debug)
File "/usr/lib/python3/dist-packages/qtvcp/qt_makepins.py", line 96,
in __init__
window[pName].instance(os.path.join(path.PANELDIR , cmd, cmd+'.ui'))
File "/usr/lib/python3/dist-packages/qtvcp/qt_makegui.py", line 382,
in instance
instance = uic.loadUi(filename, self)
File "/usr/lib/python3/dist-packages/PyQt5/uic/__init__.py", line
226, in loadUi
return DynamicUILoader(package).loadUi(uifile, baseinstance,
resource_suffix)
File "/usr/lib/python3/dist-packages/PyQt5/uic/Loader/loader.py",
line 72, in loadUi
return self.parse(filename, resource_suffix, basedir)
File "/usr/lib/python3/dist-packages/PyQt5/uic/uiparser.py", line
1013, in parse
document = parse(filename)
File "/usr/lib/python3.7/xml/etree/ElementTree.py", line 1197, in parse
tree.parse(source, parser)
File "/usr/lib/python3.7/xml/etree/ElementTree.py", line 587, in parse
source = open(source, "rb")
FileNotFoundError: [Errno 2] No such file or directory:
'/usr/share/qtvcp/panels/-d/-d.ui'
Shutting down and cleaning up LinuxCNC...
Running HAL shutdown script
task: 7083 cycles, min=0.000007, max=0.046684, avg=0.010032, 0 latency
excursions (> 10x expected cycle time of 0.010000s)
hm2_5i25.0: dropping AnyIO board at 0000:01:02.0
hm2/hm2_5i25.0: unregistered
RTAPI_PCI: Unmapped 65536 bytes at 0x7ff5da808000
hm2_pci: driver unloaded
hm2: unloading
Note: Using POSIX realtime
And looking in:
gene@GO704:~/linuxcnc/configs$ ls -lR /usr/share/qtvcp/panels/
/usr/share/qtvcp/panels/:
total 60
drwxr-xr-x 2 root root 4096 Jan 11 09:43 cam_align
drwxr-xr-x 2 root root 4096 Jan 11 09:43 copy
drwxr-xr-x 2 root root 4096 Jan 11 09:43 qtplasmac_sim
drwxr-xr-x 2 root root 4096 Jan 11 09:43 sim_panel
drwxr-xr-x 2 root root 4096 Jan 11 09:43 test_button
drwxr-xr-x 2 root root 4096 Jan 11 09:43 test_dial
drwxr-xr-x 2 root root 4096 Jan 11 09:43 test_led
drwxr-xr-x 2 root root 4096 Jan 11 09:43 test_panel
drwxr-xr-x 2 root root 4096 Jan 11 09:43 test_probe
drwxr-xr-x 2 root root 4096 Jan 11 09:43 tool_dialog
drwxr-xr-x 2 root root 4096 Jan 11 09:43 vismach_5axis_gantry
drwxr-xr-x 2 root root 4096 Jan 11 09:43 vismach_fanuc_200f
drwxr-xr-x 2 root root 4096 Jan 11 09:43 vismach_millturn
drwxr-xr-x 2 root root 4096 Jan 11 09:43 vismach_mill_xyz
drwxr-xr-x 2 root root 4096 Jan 11 09:43 vismach_scara
/usr/share/qtvcp/panels/cam_align:
total 12
-rw-r--r-- 1 root root 3878 Jan 10 12:38 cam_align_handler.py
-rw-r--r-- 1 root root 6635 Jan 10 12:38 cam_align.ui
/usr/share/qtvcp/panels/copy:
total 16
-rw-r--r-- 1 root root 7377 Jan 10 12:38 copy_handler.py
-rw-r--r-- 1 root root 6453 Jan 10 12:38 copy.ui
/usr/share/qtvcp/panels/qtplasmac_sim:
total 40
-rw-r--r-- 1 root root 15737 Jan 10 12:38 qtplasmac_sim_handler.py
-rw-r--r-- 1 root root 763 Jan 10 12:38 qtplasmac_sim.qss
-rw-r--r-- 1 root root 20095 Jan 10 12:38 qtplasmac_sim.ui
/usr/share/qtvcp/panels/sim_panel:
total 12
-rw-r--r-- 1 root root 8633 Jan 10 12:38 sim_panel.ui
/usr/share/qtvcp/panels/test_button:
total 12
-rw-r--r-- 1 root root 7257 Jan 10 12:38 test_button_handler.py
-rw-r--r-- 1 root root 3344 Jan 10 12:38 test_button.ui
/usr/share/qtvcp/panels/test_dial:
total 16
-rw-r--r-- 1 root root 4901 Jan 10 12:38 test_dial_handler.py
-rw-r--r-- 1 root root 7173 Jan 10 12:38 test_dial.ui
/usr/share/qtvcp/panels/test_led:
total 12
-rw-r--r-- 1 root root 7743 Jan 10 12:38 test_led_handler.py
-rw-r--r-- 1 root root 3345 Jan 10 12:38 test_led.ui
/usr/share/qtvcp/panels/test_panel:
total 56
-rw-r--r-- 1 root root 7074 Jan 10 12:38 test_panel_handler.py
-rw-r--r-- 1 root root 46374 Jan 10 12:38 test_panel.ui
/usr/share/qtvcp/panels/test_probe:
total 12
-rw-r--r-- 1 root root 2528 Jan 10 12:38 test_probe_handler.py
-rw-r--r-- 1 root root 4828 Jan 10 12:38 test_probe.ui
/usr/share/qtvcp/panels/tool_dialog:
total 8
-rw-r--r-- 1 root root 2994 Jan 10 12:38 tool_dialog_handler.py
-rw-r--r-- 1 root root 2159 Jan 10 12:38 tool_dialog.ui
/usr/share/qtvcp/panels/vismach_5axis_gantry:
total 8
-rw-r--r-- 1 root root 2068 Jan 10 12:38 vismach_5axis_gantry_handler.py
-rw-r--r-- 1 root root 1252 Jan 10 12:38 vismach_5axis_gantry.ui
/usr/share/qtvcp/panels/vismach_fanuc_200f:
total 8
-rw-r--r-- 1 root root 2068 Jan 10 12:38 vismach_fanuc_200f_handler.py
-rw-r--r-- 1 root root 1252 Jan 10 12:38 vismach_fanuc_200f.ui
/usr/share/qtvcp/panels/vismach_millturn:
total 8
-rw-r--r-- 1 root root 2064 Jan 10 12:38 vismach_millturn_handler.py
-rw-r--r-- 1 root root 1252 Jan 10 12:38 vismach_millturn.ui
/usr/share/qtvcp/panels/vismach_mill_xyz:
total 8
-rw-r--r-- 1 root root 2064 Jan 10 12:38 vismach_mill_xyz_handler.py
-rw-r--r-- 1 root root 1252 Jan 10 12:38 vismach_mill_xyz.ui
/usr/share/qtvcp/panels/vismach_scara:
total 8
-rw-r--r-- 1 root root 2063 Jan 10 12:38 vismach_scara_handler.py
-rw-r--r-- 1 root root 1252 Jan 10 12:38 vismach_scara.ui
gene@GO704:~/linuxcnc/configs$
It indeed is not there. What package might that stuff be in? This has a
different flavor, and I hope all this noise is useful.
Thanks Chris. take care & stay well.
Chris
________________________________
From: gene heskett <ghesk...@shentel.net>
Sent: January 7, 2023 11:27 PM
To: emc-developers@lists.sourceforge.net <emc-developers@lists.sourceforge.net>
Subject: Re: [Emc-developers] Broken master 06jan23
And of course the camera on the go704 doesn't work making qt upset at
init time for about 40 seconds of ......... spew. It only worked for 3
or 4 days a couple/three months back. With cheese it Just Works. This is
upsetting, it works for 2 or 4 upgrades, then disappears again for 6
months until I start pestering the list again.
I'm as tired of that as you all are reading about my camera woes.
It never works long enough for me to get the align kit from our wiki
fully calibrated. Yet it works with cheese on any machine I plug it into.
_______________________________________________
Emc-developers mailing list
Emc-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-developers
.
Cheers, Gene Heskett.
--
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author, 1940)
If we desire respect for the law, we must first make the law respectable.
- Louis D. Brandeis
Genes Web page <http://geneslinuxbox.net:6309/>
_______________________________________________
Emc-developers mailing list
Emc-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-developers