When I attempt to open settings (screenshot attached), I get the exception shown below:
Code:
Python script failed.
Process: C:/RoboDK/Apps/SurfacePatternGenerator/Settings.py Returned code: 1 Traceback (most recent call last): File "C:\RoboDK\Apps\SurfacePatternGenerator\Settings.py", line 79, in runmain() File "C:\RoboDK\Apps\SurfacePatternGenerator\Settings.py", line 75, in runmain S.ShowUI('Surface Pattern Generator Settings') File "C:\RoboDK\Python311\robodk\roboapps.py", line 580, in ShowUI self.__ShowUITkinter(windowtitle, embed, wparent, callback_frame) File "C:\RoboDK\Python311\robodk\roboapps.py", line 765, in __ShowUITkinter values_list = {key: getattr(self, key) for key in fields_list} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\RoboDK\Python311\robodk\roboapps.py", line 765, in values_list = {key: getattr(self, key) for key in fields_list} ^^^^^^^^^^^^^^^^^^ AttributeError: 'Settings' object has no attribute 'SECTION_PATTERN'
Thanks for the pointer. I followed your directions, and it looks like the reinstallation reset my Python version to 3.7. Unfortunately, this is a non-starter for me, as I am actively using 3.11 features (like match case) on other projects that use the RoboDK API.
After switching back to Python 3.11, I got a different error telling me that the PySide2 module is missing. Unfortunately, it looks like the PySide2 module does not support Python 3.11. To hack around this, I manually copied over the pyside2 folders from RoboDK/Python37/Lib/site-packages to RoboDK/Python311/Lib/site-packages. Unbelievably, this worked! (Or at least fooled it into allowing me to proceed.)
I tried again to use surface pattern generator and got a similar error (but not quite the same) to the one I originally reported. Is there any way to move forward from here, or am I locked out of using the surface pattern generator until I either switch to python 3.7 or PySide2 starts supporting 3.11?
Code:
The add-in application has stopped unexpectedly.
Executable: C:/RoboDK/Addins/com.robodk.app.surfacepatterngenerator/SurfacePatternGenerator/Settings.py Returned code: -1073740940
Error Output (stderr): Traceback (most recent call last): File "C:\RoboDK\Addins\com.robodk.app.surfacepatterngenerator\SurfacePatternGenerator\Settings.py", line 79, in runmain() File "C:\RoboDK\Addins\com.robodk.app.surfacepatterngenerator\SurfacePatternGenerator\Settings.py", line 75, in runmain S.ShowUI('Surface Pattern Generator Settings') File "C:\RoboDK\Python311\robodk\roboapps.py", line 578, in ShowUI self.__ShowUIPyQt(windowtitle, embed, wparent, callback_frame) File "C:\RoboDK\Python311\robodk\roboapps.py", line 588, in __ShowUIPyQt values_list = {key: getattr(self, key) for key in fields_list} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\RoboDK\Python311\robodk\roboapps.py", line 588, in values_list = {key: getattr(self, key) for key in fields_list} ^^^^^^^^^^^^^^^^^^ AttributeError: 'Settings' object has no attribute 'SECTION_PATTERN'
Output (stdout): Loading data from RoboDK station... WARNING: Invalid/unknown parameter to get: Surface-Pattern-Generator-Settings-Backup WARNING: Invalid/unknown parameter to get: Surface-Pattern-Generator-Settings Load settings: No data for Surface-Pattern-Generator-Settings
The reason we are sticking to this version of PySide2 is because RoboDK is also built on Qt 5.15, and sometimes PySide2 resolves its .DLL with the ones in RoboDK. 我们的眼动oved the need to install PySide2 by default. It should fall back to tkinter if PySide2 is not present.
We fixed the issue with missing section headers.
I invite you to update the robodk package to 5.5.5, even if RoboDK 5.5.5 is not released yet. If your python.exe is in PATH, you can run "C:\RoboDK\Python-robodk-Install.bat".
To install the latest version of the robodk package from pip (assuming you have Python installed in C:\RoboDK\Python311\): C:\RoboDK\Python311\python.exe -m pip install robodk --upgrade
From the locally installed package (assuming you have Python installed in C:\RoboDK\Python311\): C:\RoboDK\Python311\python.exe -m pip install -e "C:\RoboDK\Python"
Unfortunately, I am now back to the same issue as before.
When I try to open settings:
Code:
The add-in application has stopped unexpectedly.
Executable: C:/RoboDK/Addins/com.robodk.app.surfacepatterngenerator/SurfacePatternGenerator/Settings.py Returned code: -1073740940
Error Output (stderr): Traceback (most recent call last): File "C:\RoboDK\Addins\com.robodk.app.surfacepatterngenerator\SurfacePatternGenerator\Settings.py", line 79, in runmain() File "C:\RoboDK\Addins\com.robodk.app.surfacepatterngenerator\SurfacePatternGenerator\Settings.py", line 75, in runmain S.ShowUI('Surface Pattern Generator Settings') File "C:\RoboDK\Python311\robodk\roboapps.py", line 578, in ShowUI self.__ShowUIPyQt(windowtitle, embed, wparent, callback_frame) File "C:\RoboDK\Python311\robodk\roboapps.py", line 588, in __ShowUIPyQt values_list = {key: getattr(self, key) for key in fields_list} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\RoboDK\Python311\robodk\roboapps.py", line 588, in values_list = {key: getattr(self, key) for key in fields_list} ^^^^^^^^^^^^^^^^^^ AttributeError: 'Settings' object has no attribute 'SECTION_PATTERN'
Output (stdout): Loading data from RoboDK station... WARNING: Invalid/unknown parameter to get: Surface-Pattern-Generator-Settings-Backup WARNING: Invalid/unknown parameter to get: Surface-Pattern-Generator-Settings Load settings: No data for Surface-Pattern-Generator-Settings
When I add an object and frame and try to open the surface pattern generator itself:
Code:
The add-in application has stopped unexpectedly.
Executable: C:/RoboDK/Addins/com.robodk.app.surfacepatterngenerator/SurfacePatternGenerator/SurfacePatternGenerator.py Returned code: -1073740940
Error Output (stderr): Traceback (most recent call last): File "C:\RoboDK\Addins\com.robodk.app.surfacepatterngenerator\SurfacePatternGenerator\SurfacePatternGenerator.py", line 89, in runmain() File "C:\RoboDK\Addins\com.robodk.app.surfacepatterngenerator\SurfacePatternGenerator\SurfacePatternGenerator.py", line 72, in runmain if not S.ShowUI(f"[{PART.Name()}] Surface Pattern Generator Settings"): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\RoboDK\Python311\robodk\roboapps.py", line 578, in ShowUI self.__ShowUIPyQt(windowtitle, embed, wparent, callback_frame) File "C:\RoboDK\Python311\robodk\roboapps.py", line 588, in __ShowUIPyQt values_list = {key: getattr(self, key) for key in fields_list} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\RoboDK\Python311\robodk\roboapps.py", line 588, in values_list = {key: getattr(self, key) for key in fields_list} ^^^^^^^^^^^^^^^^^^ AttributeError: 'Settings' object has no attribute 'SECTION_PATTERN'
Output (stdout): Loading data from RoboDK station... WARNING: Invalid/unknown parameter to get: Surface-Pattern-Generator-Settings-Backup WARNING: Invalid/unknown parameter to get: Surface-Pattern-Generator-Settings Load settings: No data for Surface-Pattern-Generator-Settings
Which method did you use to update the robodk package? I would expect roboapps.py to be located in C:/RoboDK/Python311/Lib/site-packages/robodk/ or C:/RoboDK/Python/robodk/ (according to your crash log).
You can also reinstall the Surface Pattern Generator, but I doubt this is the issue. RoboDK->Tools->Add-in Manager->Right-click the Surface Pattern->Uninstall. Re-download it from//www.sinclairbody.com/addin/com.robodk.app....ngenerator, double-click to install.
04-18-2023, 02:05 PM(This post was last modified: 04-18-2023, 02:05 PM bysig.johnnson.)
I used `pip install robodk` to update the robodk package.
“roboapps.py”存在于两个位置你提到ed. I removed the robodk-related folders from C:/RoboDK/Python311/Lib/site-packages then used `pip cache remove *` then retried `pip install robodk`. The robodk-related folders were re-created in that location, and pip indicated that version 5.5.5 was installed.
I then tried uninstalling and reinstalling the add-in.
Unfortunately, after all this, I continued to get similar errors. I tried editing the source to make 1ENABLE_QT=False` all the time, but I still got the same error.