Add ons manager - development and bugs topic

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
mnesarco
Posts: 475
Joined: Thu Mar 26, 2020 8:52 pm

Re: Add ons manager - development and bugs topic

Post by mnesarco »

Syres wrote: Sun May 24, 2020 11:12 am
mnesarco wrote: Sat May 23, 2020 8:42 pm It runs on windows now, needs a lot of testing of course, but at least you can try it.
This is what I had to hack https://github.com/mnesarco/FreeCAD_Ext ... 16:patch-1 to get the Wb to start using:

OS: Windows 7 SP 1 (6.1)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.21189 (Git)
Build type: Release
Branch: master
Hash: 0d416c807bfb12e27806e375c432a3ed08ba8701
Python version: 3.6.8
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/United Kingdom (en_GB)

The macro that tripped up the start phase was https://wiki.freecadweb.org/Macro_FC_Convert_Lines I'm sure there's a much cleaner solution but at least you know where there's differences between your fresh Win 10 and my several years old Win 7 setup.
Thank you Syres. I will apply the changes but i will change it a little to be more consistent with my way of checking platform and logging. Thank you for taking time into this. It is a big surprise that someone is using windows 7 :D In that case I need to do more adjusts for sure.
User avatar
mnesarco
Posts: 475
Joined: Thu Mar 26, 2020 8:52 pm

Re: Add ons manager - development and bugs topic

Post by mnesarco »

Syres wrote: Sun May 24, 2020 11:12 am
mnesarco wrote: Sat May 23, 2020 8:42 pm It runs on windows now, needs a lot of testing of course, but at least you can try it.
This is what I had to hack https://github.com/mnesarco/FreeCAD_Ext ... 16:patch-1 to get the Wb to start using:

OS: Windows 7 SP 1 (6.1)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.21189 (Git)
Build type: Release
Branch: master
Hash: 0d416c807bfb12e27806e375c432a3ed08ba8701
Python version: 3.6.8
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/United Kingdom (en_GB)

The macro that tripped up the start phase was https://wiki.freecadweb.org/Macro_FC_Convert_Lines I'm sure there's a much cleaner solution but at least you know where there's differences between your fresh Win 10 and my several years old Win 7 setup.
Hi Syres,
I have two observations:

In the proposed change in macro_parser, if the problem is with accented chars in path, probably the try/except should cover the open and not the inner block because the inner block does nothing with the path itself. If you can, it would be great if you post the error so i can understand it better because i have no Win7 to test.

The second change, the one in webview.py cannot be applied as it is because C: drive letter should not be hardcoded. It could be any letter. So I will prepend the same drive letter in the path returned by

Code: Select all

App.getUserAppDataDir()
.

Thank you for your help.
Syres
Veteran
Posts: 2902
Joined: Thu Aug 09, 2018 11:14 am

Re: Add ons manager - development and bugs topic

Post by Syres »

mnesarco wrote: Sun May 24, 2020 3:28 pm In the proposed change in macro_parser, if the problem is with accented chars in path, probably the try/except should cover the open and not the inner block because the inner block does nothing with the path itself. If you can, it would be great if you post the error so i can understand it better because i have no Win7 to test.
Typically I'm struggling to get it to fault again but I'm fairly certain that the accented character is in the f.read() rather than the path, it mentioned oridnal 3328 (or there abouts) which I believe is the character nth position in the macro file. While the author has been advised of this on numerous occasions we need to know that they can be handled gracefully. The error was very similar to https://stackoverflow.com/questions/923 ... 74#9233174





On a completely different subject I have a dual boot system so yes I'm trying to convert off Win7 but I can't at the moment. This is the important info from my Report View using what I would class as a fairly standard install (other than I compile FreeCAD):

OS: Linux Mint 19.3 (X-Cinnamon/cinnamon)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.21228 (Git)
Build type: Unknown
Branch: master
Hash: 8ac6b12ee56bbe3087358706a725101c493c0706
Python version: 3.6.9
Qt version: 5.9.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedKingdom (en_GB)

Code: Select all

Init: Initializing freecad.extman
Loading GUI of Web module... done
During initialization the error "No module named 'PySide2.QtWebEngineWidgets'" occurred in freecad.extman
--------------------------------------------------------------------------------
Traceback (most recent call last):
  File "<string>", line 150, in InitApplications
  File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 994, in _gcd_import
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/john/.FreeCAD/Mod/FreeCAD_ExtMan/freecad/extman/init_gui.py", line 27, in <module>
    from freecad.extman.browser import install_router, start_browser
  File "/home/john/.FreeCAD/Mod/FreeCAD_ExtMan/freecad/extman/browser.py", line 27, in <module>
    from PySide2.QtWebEngineWidgets import QWebEngineView
ModuleNotFoundError: No module named 'PySide2.QtWebEngineWidgets'
--------------------------------------------------------------------------------
Init:      Initializing freecad.extman... failed
--------------------------------------------------------------------------------
Traceback (most recent call last):
  File "<string>", line 150, in InitApplications
  File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 994, in _gcd_import
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/john/.FreeCAD/Mod/FreeCAD_ExtMan/freecad/extman/init_gui.py", line 27, in <module>
    from freecad.extman.browser import install_router, start_browser
  File "/home/john/.FreeCAD/Mod/FreeCAD_ExtMan/freecad/extman/browser.py", line 27, in <module>
    from PySide2.QtWebEngineWidgets import QWebEngineView
ModuleNotFoundError: No module named 'PySide2.QtWebEngineWidgets'
--------------------------------------------------------------------------------
Syres
Veteran
Posts: 2902
Joined: Thu Aug 09, 2018 11:14 am

Re: Add ons manager - development and bugs topic

Post by Syres »

You should be looking for

Code: Select all

fenêtre
, one is on line 78 and the other on line 1066 in https://gist.githubusercontent.com/mari ... es.FCMacro I think those are the only two accents.
User avatar
mnesarco
Posts: 475
Joined: Thu Mar 26, 2020 8:52 pm

Re: Add ons manager - development and bugs topic

Post by mnesarco »

Syres wrote: Sun May 24, 2020 4:22 pm You should be looking for

Code: Select all

fenêtre
, one is on line 78 and the other on line 1066 in https://gist.githubusercontent.com/mari ... es.FCMacro I think those are the only two accents.
Thank you Syres, so the problem is in the file's content and not in path if i understand well. I will push the changes so you can test when you have some time.
User avatar
mnesarco
Posts: 475
Joined: Thu Mar 26, 2020 8:52 pm

Re: Add ons manager - development and bugs topic

Post by mnesarco »

Syres wrote: Sun May 24, 2020 4:10 pm
mnesarco wrote: Sun May 24, 2020 3:28 pm On a completely different subject I have a dual boot system so yes I'm trying to convert off Win7 but I can't at the moment. This is the important info from my Report View using what I would class as a fairly standard install (other than I compile FreeCAD):

OS: Linux Mint 19.3 (X-Cinnamon/cinnamon)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.21228 (Git)
Build type: Unknown
Branch: master
Hash: 8ac6b12ee56bbe3087358706a725101c493c0706
Python version: 3.6.9
Qt version: 5.9.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedKingdom (en_GB)

Code: Select all

Init: Initializing freecad.extman
Loading GUI of Web module... done
During initialization the error "No module named 'PySide2.QtWebEngineWidgets'" occurred in freecad.extman
--------------------------------------------------------------------------------
Traceback (most recent call last):
  File "<string>", line 150, in InitApplications
  File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 994, in _gcd_import
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/john/.FreeCAD/Mod/FreeCAD_ExtMan/freecad/extman/init_gui.py", line 27, in <module>
    from freecad.extman.browser import install_router, start_browser
  File "/home/john/.FreeCAD/Mod/FreeCAD_ExtMan/freecad/extman/browser.py", line 27, in <module>
    from PySide2.QtWebEngineWidgets import QWebEngineView
ModuleNotFoundError: No module named 'PySide2.QtWebEngineWidgets'
--------------------------------------------------------------------------------
Init:      Initializing freecad.extman... failed
--------------------------------------------------------------------------------
Traceback (most recent call last):
  File "<string>", line 150, in InitApplications
  File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 994, in _gcd_import
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/john/.FreeCAD/Mod/FreeCAD_ExtMan/freecad/extman/init_gui.py", line 27, in <module>
    from freecad.extman.browser import install_router, start_browser
  File "/home/john/.FreeCAD/Mod/FreeCAD_ExtMan/freecad/extman/browser.py", line 27, in <module>
    from PySide2.QtWebEngineWidgets import QWebEngineView
ModuleNotFoundError: No module named 'PySide2.QtWebEngineWidgets'
--------------------------------------------------------------------------------


About this, well, I set before That this only works with qt5, I don't know the details of different FreeCAD builds but what I understand is that 0.19 uses qt5 and PySide2, I need to investigate this but it is supposed that PySide2.QtWebEngineWidgets is available in 0.19 builds.
User avatar
mnesarco
Posts: 475
Joined: Thu Mar 26, 2020 8:52 pm

Re: Add ons manager - development and bugs topic

Post by mnesarco »

Hi @Syres,

I have committed some changes:

https://github.com/mnesarco/FreeCAD_Ext ... 6b8b04612c

Please tell me if that works in your environment.

Cheers,

Frank.
vocx
Veteran
Posts: 5197
Joined: Thu Oct 18, 2018 9:18 pm

Re: Add ons manager - development and bugs topic

Post by vocx »

mnesarco wrote: Sun May 24, 2020 4:39 pm ... I need to investigate this but it is supposed that PySide2.QtWebEngineWidgets is available in 0.19 builds.
Qt has many different components. This QtWebEngineWidgets package doesn't seem to be used by the base FreeCAD system, so it is normally not installed in Linux systems.

Code: Select all

sudo apt install python3-pyside2.qtwebchannel
sudo apt install python3-pyside2.qtnetwork
sudo apt install python3-pyside2.qtwebenginecore
sudo apt install python3-pyside2.qtwebenginewidgets
With these requisites installed, it no longer fails to import the modules.

Code: Select all

from PySide2.QtWebEngineWidgets import QWebEngineSettings, QWebEngineView, QWebEnginePage
Maybe add your requirements in your top level README file, so that users are aware of what they need.
Always add the important information to your posts if you need help. Also see Tutorials and Video tutorials.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.
User avatar
mnesarco
Posts: 475
Joined: Thu Mar 26, 2020 8:52 pm

Re: Add ons manager - development and bugs topic

Post by mnesarco »

vocx wrote: Sun May 24, 2020 7:04 pm
mnesarco wrote: Sun May 24, 2020 4:39 pm ... I need to investigate this but it is supposed that PySide2.QtWebEngineWidgets is available in 0.19 builds.
Qt has many different components. This QtWebEngineWidgets package doesn't seem to be used by the base FreeCAD system, so it is normally not installed in Linux systems.

Code: Select all

sudo apt install python3-pyside2.qtwebchannel
sudo apt install python3-pyside2.qtnetwork
sudo apt install python3-pyside2.qtwebenginecore
sudo apt install python3-pyside2.qtwebenginewidgets
With these requisites installed, it no longer fails to import the modules.

Code: Select all

from PySide2.QtWebEngineWidgets import QWebEngineSettings, QWebEngineView, QWebEnginePage
Maybe add your requirements in your top level README file, so that users are aware of what they need.
Thank you vocx. I didn't know there were not included with FreeCAD. I will update the readme, and manifest.
vocx
Veteran
Posts: 5197
Joined: Thu Oct 18, 2018 9:18 pm

Re: Add ons manager - development and bugs topic

Post by vocx »

mnesarco wrote: Sun May 24, 2020 7:14 pm Thank you vocx. I didn't know there were not included with FreeCAD. I will update the readme, and manifest.
In general, nothing is included in FreeCAD itself. You still have to install the operating system dependencies, like Qt5, Python 3, Numpy, etc. A Debian package, .deb, normally lists the requirements so they are installed automatically for the user. So, if your new addon manager replaces the current one, then the requisites for the Debian package must be updated to include those additional packages.

In Windows and MacOS the situation is different because the Conda packages have all those requisites included.
Always add the important information to your posts if you need help. Also see Tutorials and Video tutorials.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.
Post Reply