Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

SURFACE PATTERN GENERATOR FAILS

#1
After installing the surface pattern generator add-in from https://robodk.com/addin/com.robodk.app....ngenerator, I am unable to use it.

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'

This seems like a similar issue to an already-open issue on the GitHub. https://github.com/RoboDK/Plug-In-Interface/issues/46

My python modules:
Code:
Package           Version
----------------- -------
asttokens         2.2.1
attrs             22.2.0
backcall          0.2.0
cffi              1.15.1
clr-loader        0.2.5
colorama          0.4.6
comm              0.1.2
contourpy         1.0.6
cycler            0.11.0
debugpy           1.6.6
decorator         5.1.1
dill              0.3.6
display           1.0.0
executing         1.2.0
fonttools         4.38.0
iniconfig         1.1.1
ipykernel         6.21.3
ipython           8.11.0
jedi              0.18.2
joblib            1.2.0
jupyter_client    8.0.3
jupyter_core      5.2.0
kiwisolver        1.4.4
matplotlib        3.7.1
matplotlib-inline 0.1.6
nest-asyncio      1.5.6
numpy             1.24.1
numpy-stl         3.0.1
packaging         22.0
pandas            1.5.2
parso             0.8.3
pick              2.2.0
pickleshare       0.7.5
Pillow            9.4.0
pip               22.3.1
platformdirs      3.1.1
pluggy            1.0.0
POAP              0.1.26
prompt-toolkit    3.0.38
psutil            5.9.4
pure-eval         0.2.2
pycparser         2.21
pyDOE2            1.3.0
Pygments          2.14.0
pyparsing         3.0.9
pypdf             3.7.0
pyperclip         1.8.2
pySOT             0.3.3
pySW              1.4
pytest            7.2.0
python-dateutil   2.8.2
python-utils      3.5.2
pythonnet         3.0.1
pytz              2022.7
pywin32           305
pyzmq             25.0.1
scikit-learn      1.2.0
scipy             1.10.0
setuptools        65.5.0
six               1.16.0
stack-data        0.6.2
threadpoolctl     3.1.0
tornado           6.2
traitlets         5.9.0
wcwidth           0.2.6
windows-curses    2.3.1


Attached Files Thumbnail(s)
   
#2
This is most likely because you are using an older version of the RoboDK Python API.

1. Download the latest version of RoboDK (https://robodk.com/download)
2. Make sure you select check the "Python" option.

If you are familiar with pip, you can also update the API this way.
https://pypi.org/project/robodk/
Please read the Forum Guidelines before posting!
Find useful information about RoboDK by visiting our Online Documentation.
#3
Hi Sam,

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 <module>
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 <dictcomp>
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
#4
I just released robodk 5.5.5, which includes fixes for issues mentioned in the thread.
https://pypi.org/project/robodk/

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.
We removed 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"
Please read the Forum Guidelines before posting!
Find useful information about RoboDK by visiting our Online Documentation.
#5
Hi Sam,

Thanks for the quick update to fix that!

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 <module>
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 <dictcomp>
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 <module>
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 <dictcomp>
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
#6
Interesting..

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 https://robodk.com/addin/com.robodk.app....ngenerator, double-click to install.
Please read the Forum Guidelines before posting!
Find useful information about RoboDK by visiting our Online Documentation.
#7
I used `pip install robodk` to update the robodk package.

`roboapps.py` exists in both locations you mentioned. 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.
  




Users browsing this thread:
2 Guest(s)