Vendor Parts Workbench

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
Syres
Veteran
Posts: 2893
Joined: Thu Aug 09, 2018 11:14 am

Re: Vendor Parts Workbench

Post by Syres »

drmacro wrote: Wed Sep 29, 2021 1:47 pm

Code: Select all

cannot import name 'QtWebEngineWidgets' from 'PySide2' (/usr/lib/python3/dist-packages/PySide2/__init__.py)
09:45:02  Traceback (most recent call last):
  File "/home/mac/.FreeCAD/Mod/FreeCAD_vendor_parts/freecad/vendor_parts/init_gui.py", line 28, in Initialize
    from freecad.vendor_parts import vendorpartstools
  File "/home/mac/.FreeCAD/Mod/FreeCAD_vendor_parts/freecad/vendor_parts/vendorpartstools.py", line 4, in <module>
    from PySide2 import QtWebEngineWidgets

Python version: 3.7.3
Qt version: 5.11.3
This isn't a workbench issue IMHO, your FC is missing PyQtWebEngine and the only way I know of installing is using your favourite mechanism pip. By all means have a search for an alternative install method but that's why the Wb won't start.
drmacro
Veteran
Posts: 8864
Joined: Sun Mar 02, 2014 4:35 pm

Re: Vendor Parts Workbench

Post by drmacro »

Syres wrote: Wed Sep 29, 2021 2:01 pm This isn't a workbench issue IMHO, your FC is missing PyQtWebEngine and the only way I know of installing is using your favourite mechanism pip. By all means have a search for an alternative install method but that's why the Wb won't start.
I admit to not having a any where near a good understanding of the the Pyside2/PyQt, etc. requirements or why what should be a basically vanilla system has this issue.

I can build the source code (have done so multiple times just today). That means the deps are on this machine to build.

If the PyQtWebEngine is missing, where is it missing from? Nothing else seems to complain.


Add to that I have a test PC, with the same issue (similar configuration, builds FC, etc.) and I just tried the pip install pyside2.

After which, FreeCAD will not start. It shows some of the splash screen and just disappears. Run from the command line and it barfs a lot of stuff about not finding shiboken2.

uninstall pyside2 with pip and, viola, FreeCAD starts just fine.

I'm happy to be educated and unconfused, I await suggestions.
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
Syres
Veteran
Posts: 2893
Joined: Thu Aug 09, 2018 11:14 am

Re: Vendor Parts Workbench

Post by Syres »

drmacro wrote: Wed Sep 29, 2021 2:46 pm
If the PyQtWebEngine is missing, where is it missing from? Nothing else seems to complain.
My (very poor) understanding is Qt 5.11 never included PyQtWebEngine so I thought it could be installed on top but if you look at the specific history it only goes back to Qt 5.12 https://pypi.org/project/PyQtWebEngine/#history

Therefore my only suggestion is Qt would need to be upgraded first, alternatively see if the Wb author can come up with some routine to bypass the need for this specific dependency.
Syres
Veteran
Posts: 2893
Joined: Thu Aug 09, 2018 11:14 am

Re: Vendor Parts Workbench

Post by Syres »

I have a Linux Mint 19.1 VM on my Windows system that I can afford to break, so I'm going to try a Qt5.15.2 upgrade from Qt5.9.5 including the PyQtWebEngine, and if successful I'll post the procedure I followed, all at your own risk!!


Edit: Had to abandon this at line 1, too much space needed (15Gb) but this is the procedure I was going to follow https://www.linuxfromscratch.org/blfs/v ... x/qt5.html
drmacro
Veteran
Posts: 8864
Joined: Sun Mar 02, 2014 4:35 pm

Re: Vendor Parts Workbench

Post by drmacro »

Since I have no burning need to for the tool (I survived for years going to McMaster, etc. and getting models by hand... 8-) ) I just gave up trying to figure out the PySide2 issue.

Nothing else seems to complain about PySide2 or the QtWebEngineWigets, so I just figure it will come in the wash eventually. ;)
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
User avatar
alex_55
Posts: 62
Joined: Mon May 11, 2020 1:50 am

Re: Vendor Parts Workbench

Post by alex_55 »

Update:
Installation via the Addon manager is now supported/recommended.
Thanks to everyone who helped by testing out this project.
drmacro
Veteran
Posts: 8864
Joined: Sun Mar 02, 2014 4:35 pm

Re: Vendor Parts Workbench

Post by drmacro »

I do not understand why my installation is so different... :(

Just installed from Addon manger:

Code: Select all

cannot import name 'QtWebEngineWidgets' from 'PySide2' (/usr/lib/python3/dist-packages/PySide2/__init__.py)
13:35:25  Traceback (most recent call last):
  File "/home/mac/.local/share/FreeCAD/Mod/VendorParts/freecad/vendor_parts/init_gui.py", line 28, in Initialize
    from freecad.vendor_parts import vendorpartstools
  File "/home/mac/.local/share/FreeCAD/Mod/VendorParts/freecad/vendor_parts/vendorpartstools.py", line 4, in <module>
    from PySide2 import QtWebEngineWidgets

Edit: I do actually understand somewhat.

On a machine that has 5.11.x of Pyside and Shiboken the Pyside2 is different. (In this case Debian 10)
On a machine with 5.15 of these the workbench runs fine. (in this case Manjaro)

Attempting to use pip to install Pyside to fix it in a 5.11 install renders the FreeCAD on that machine dead. It won't build or run.
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
LHC
Posts: 321
Joined: Thu Sep 17, 2020 4:21 pm
Location: Canadian Coffee Shop

Re: Vendor Parts Workbench

Post by LHC »

I'm getting the following error when I installed and then tried to launch the VendorParts. I had tinkered with this workbench some time ago with a manual install, and I went and deleted that before I did the addon manager install, so I am not sure if maybe I have borked something in the process.....

OS: Windows 10 (10.0)
Word size of FreeCAD: 64-bit
Version: 0.20.26306 (Git)
Build type: Release
Python version: 3.8.12
Qt version: 5.12.9
Coin version: 4.0.0
OCC version: 7.5.3
Locale: English/United States (en_US)
vendorparts.JPG
vendorparts.JPG (62.79 KiB) Viewed 2155 times
User avatar
alex_55
Posts: 62
Joined: Mon May 11, 2020 1:50 am

Re: Vendor Parts Workbench

Post by alex_55 »

LHC wrote: Sun Nov 14, 2021 9:42 pm I'm getting the following error when I installed and then tried to launch the VendorParts. I had tinkered with this workbench some time ago with a manual install, and I went and deleted that before I did the addon manager install, so I am not sure if maybe I have borked something in the process.....

OS: Windows 10 (10.0)
Word size of FreeCAD: 64-bit
Version: 0.20.26306 (Git)
Build type: Release
Python version: 3.8.12
Qt version: 5.12.9
Coin version: 4.0.0
OCC version: 7.5.3
Locale: English/United States (en_US)

vendorparts.JPG
This happens because your new install is in a different location (.../Mod/FreeCAD_vendor_parts vs .../Mod/FreeCAD_vendor_parts-master). I wanted to ship a list of vendors as a text file with the WB, but also make it user-changeable. My solution was to include the vendor list in the install files, and set its location with a user preferences entry. when the WB starts, it sets the expected default path only if it doesn't already exist (to prevent overwriting a user selection of a different file).

to fix:
- activate the workbench
- edit > preferences > select vendorparts page > change the path to point to the file in the new install.

sorry about the early-adopter tax.
LHC
Posts: 321
Joined: Thu Sep 17, 2020 4:21 pm
Location: Canadian Coffee Shop

Re: Vendor Parts Workbench

Post by LHC »

Yes sir ! Works now - thanks for the help. This info might help some other hapless lad like myself so I don't mind being a taxed early adopter :D
Post Reply