FreeCAD won't start, even appimage after pySide2 install

Having trouble installing or compiling FreeCAD? Get help here.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
drmacro
Veteran
Posts: 9000
Joined: Sun Mar 02, 2014 4:35 pm

FreeCAD won't start, even appimage after pySide2 install

Post by drmacro »

I was working through this tutorial: https://wiki.freecadweb.org/Dialog_creation

When I got the part about converting the dialog to a .py file.

The pyside-uic wasn't found:

Code: Select all

pyside-uic mywidget.ui -o mywidget.py
I then issued the following command:

Code: Select all

python3 -m pip install pySide2
Then the pyside-uic command worked.

But, when FC is started:

Code: Select all

During initialization the error "name '_init_pyside_extension' is not defined" occurred in /home/mac/freecad-build/Mod/Arch/InitGui.py
Please look into the log file for further information
During initialization the error "name '_init_pyside_extension' is not defined" occurred in /home/mac/freecad-build/Mod/Tux/InitGui.py
Please look into the log file for further information
During initialization the error "name '_init_pyside_extension' is not defined" occurred in /home/mac/freecad-build/Mod/AddonManager/InitGui.py
Please look into the log file for further information
During initialization the error "name '_init_pyside_extension' is not defined" occurred in /home/mac/freecad-build/Mod/Draft/InitGui.py
Please look into the log file for further information
Unknown command 'Std_AddonMgr'
Fatal Python error: could not initialize part 2
Python runtime state: initialized

Current thread 0x00007fdea6d5d100 (most recent call first):
  File "/usr/lib/python3/dist-packages/six.py", line 128 in __init__
  File "/usr/lib/python3/dist-packages/six.py", line 320 in <module>
  File "<frozen importlib._bootstrap>", line 219 in _call_with_frames_removed
  File "<frozen importlib._bootstrap_external>", line 783 in exec_module
  File "<frozen importlib._bootstrap>", line 671 in _load_unlocked
  File "<frozen importlib._bootstrap>", line 975 in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 991 in _find_and_load
  File "/home/mac/freecad-build/Mod/Start/StartPage/StartPage.py", line 27 in <module>
  File "<frozen importlib._bootstrap>", line 219 in _call_with_frames_removed
  File "<frozen importlib._bootstrap_external>", line 783 in exec_module
  File "<frozen importlib._bootstrap>", line 671 in _load_unlocked
  File "<frozen importlib._bootstrap>", line 975 in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 991 in _find_and_load
  File "<frozen importlib._bootstrap>", line 219 in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1042 in _handle_fromlist
  File "<string>", line 2 in <module>
Aborted (core dumped)
It is followed by a LOT more all complaining about PySide2.

The FC is built from source and still builds with no errors.

Any help on fixing this much appreciated.
Last edited by drmacro on Mon Apr 19, 2021 12:10 pm, edited 1 time in total.
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
User avatar
onekk
Veteran
Posts: 6222
Joined: Sat Jan 17, 2015 7:48 am
Contact:

Re: Working through wiki tutorial now FreeCAD won't start

Post by onekk »

FreeCAD is having his version of PySide2.

It is referred as PySide, (that is the old name for the QT4 version) for compatibilty reason.

Probably installing PySide2 you have messed up things and now FreeCAD is not finding his internal version correctly.

I could be no more helpful, as When I'm using GUI work I prefer to desgin the interface from scratch, doing some positioning by hand, as in times, I've not ound usefult the "helpers" to design the interface, for simple things, or even for more complicated things, as using python you could "programmatically" create even a whole interface using some "high level" definition.

Code: Select all

("ifi_sides", ("mn", "Box Sides", "mm", 3, 10, 1, 4),
        "Number of sides"),
    ("cbo_type",  ("mn", "Box Type", ("Closed", "Open", "Frame", "With Cover")),
        "Box Type"),
    ("ifd_hei", ("mn", "Box Height", "mm", 20, 800, 0.5, 200),
        "Box Height (along Y axis), for polygonal boxes this value is the " +
        "internal diameter, (apothem * 2)"),
    ("ifd_wid", ("mn", "Box Width", "mm", 20, 800, 0.5, 100),
        "Box Width (along X axis)"),
This is an example, then a 400 lines of code will traverse to this lis and create the appropriate input interface for many fields:
GUI-new.png
GUI-new.png (50.88 KiB) Viewed 1556 times
Hope it helps

Regards

Carlo D.
GitHub page: https://github.com/onekk/freecad-doc.
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.

Blog: https://okkmkblog.wordpress.com/
drmacro
Veteran
Posts: 9000
Joined: Sun Mar 02, 2014 4:35 pm

Re: Working through wiki tutorial now FreeCAD won't start

Post by drmacro »

I used the pip to remove the Pyside2.

And reinstalled all the deps.

Then did a make clean and build.

Same issue.

Edit: in fact, I can't even run an appimage, :o
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
User avatar
onekk
Veteran
Posts: 6222
Joined: Sat Jan 17, 2015 7:48 am
Contact:

Re: Working through wiki tutorial now FreeCAD won't start

Post by onekk »

Sorry, I'm usign only AppImage, to avoid such things, all is in the pack and is "isolated" from the working environment, only drawback is the introspection of Python not working as the AppImage is uncompressed in /tmp/something and something is varying on each run.

But I'm told that it is possible to decompress AppImage in a fixed location and then use it as it was compressed (only drawback is that it use more disc space).

Sadly dependencies hell is a real problem, using internal interpreter as when you compile from scratch is source of troubles, as library versions could diverge and some settings could be left over (like some environment variables).

Chances are that the hidden FreeCAD user directory (I've not seen and indication of what OS you are using, maybe my fault)

Said that many developers use a container to develop on it (didn't know how and what is necessary to do such thing, and the drawbacks).

Hope it help.

Regards

Carlo D.
GitHub page: https://github.com/onekk/freecad-doc.
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.

Blog: https://okkmkblog.wordpress.com/
drmacro
Veteran
Posts: 9000
Joined: Sun Mar 02, 2014 4:35 pm

Re: FreeCAD won't start, even appimage after pySide2 install

Post by drmacro »

I updated the title and added more of the crash report to OP.
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
user1234
Veteran
Posts: 3512
Joined: Mon Jul 11, 2016 5:08 pm

Re: FreeCAD won't start, even appimage after pySide2 install

Post by user1234 »

I do not now what OS you use, but i install all packages only over apt (Debian). Best experience with that.
drmacro wrote: Sun Apr 18, 2021 1:14 pm The FC is built from source and still builds with no errors.
I think when you install the packages after compiling you must recompile FreeCAD. For compiling PySide (and other Python packages) is no hard dependencies. Test before you recompile if the Draft Workbench works correctly. I also can compile FreeCAD without PySide, but then the Draft Workbench won't work.

Greetings
user1234
drmacro
Veteran
Posts: 9000
Joined: Sun Mar 02, 2014 4:35 pm

Re: FreeCAD won't start, even appimage after pySide2 install

Post by drmacro »

user1234 wrote: Mon Apr 19, 2021 12:40 pm I do not now what OS you use, but i install all packages only over apt (Debian). Best experience with that.
drmacro wrote: Sun Apr 18, 2021 1:14 pm The FC is built from source and still builds with no errors.
I think when you install the packages after compiling you must recompile FreeCAD. For compiling PySide (and other Python packages) is no hard dependencies. Test before you recompile if the Draft Workbench works correctly. I also can compile FreeCAD without PySide, but then the Draft Workbench won't work.

Greetings
user1234
Umm...in this case Ubuntu.

I have not only done what you suggest, but have completely removed (complete removal with apt) ALL the FC deps.
Reinstalled all deps, with apt.
Did a "make clean"
Did a cmake
then build

I also removed the pyside2 package I installed that started all this.

At this point starting either the built version, an appimage, or even a different version of FC I get the errors shown in the OP.
FC never gets to the point of "test if Draft Workbench works correctly"...FC does not run it crashes, can't test anything. :(
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
User avatar
s-light
Posts: 119
Joined: Thu Feb 12, 2015 11:39 am
Location: Germany, Hofheim am Taunus
Contact:

Re: FreeCAD won't start, even appimage after pySide2 install

Post by s-light »

hui today i got the same / very similar problem with the freecad-daily build..

system information:

Code: Select all

Operating System: Kubuntu 20.04
KDE Plasma Version: 5.18.5
KDE Frameworks Version: 5.68.0
Qt Version: 5.12.8
Kernel Version: 5.4.0-72-generic
OS Type: 64-bit
Processors: 16 × Intel® Core™ i9-9980HK CPU @ 2.40GHz
Memory: 31,2 GiB of RAM
i worked on a freecad / blender script -
and got some 'PySide' not found messages -
so just thought ok - just install PySide2 with pip and iam fine..:

Code: Select all

pip3 install pyside2
only after this i found the FreeCAD PySide wiki page.
so i added this path to my import handling and it worked for my script.
then i wanted to change something in my FreeCAD model and tried to start FreeCAD-Daily:

Code: Select all

stefan@stefan-Zen:~$ freecad-daily 
FreeCAD 0.19, Libs: 0.19R
© Juergen Riegel, Werner Mayer, Yorik van Havre and others 2001-2021
FreeCAD is free and open-source software licensed under the terms of LGPL2+ license.
FreeCAD wouldn't be possible without FreeCAD community.
  #####                 ####  ###   ####  
  #                    #      # #   #   # 
  #     ##  #### ####  #     #   #  #   # 
  ####  # # #  # #  #  #     #####  #   # 
  #     #   #### ####  #    #     # #   # 
  #     #   #    #     #    #     # #   #  ##  ##  ##
  #     #   #### ####   ### #     # ####   ##  ##  ##

Sheet Metal workbench loaded
Loading Assembly4 WorkBench
Interlocking laser cut workbench loaded
During initialization the error "name '_init_pyside_extension' is not defined" occurred in /usr/share/freecad-daily/Mod/AddonManager/InitGui.py
Please look into the log file for further information
During initialization the error "name '_init_pyside_extension' is not defined" occurred in /usr/share/freecad-daily/Mod/Arch/InitGui.py
Please look into the log file for further information
During initialization the error "name '_init_pyside_extension' is not defined" occurred in /usr/share/freecad-daily/Mod/OpenSCAD/InitGui.py
Please look into the log file for further information
During initialization the error "name '_init_pyside_extension' is not defined" occurred in /usr/share/freecad-daily/Mod/Draft/InitGui.py
Please look into the log file for further information
During initialization the error "name '_init_pyside_extension' is not defined" occurred in /usr/share/freecad-daily/Mod/Tux/InitGui.py
Please look into the log file for further information
During initialization the error "name '_init_pyside_extension' is not defined" occurred in /home/stefan/mydata/freecad/.FreeCAD/Mod/lattice2/InitGui.py
Please look into the log file for further information
During initialization the error "name '_init_pyside_extension' is not defined" occurred in /home/stefan/mydata/freecad/.FreeCAD/Mod/A2plus/InitGui.py
Please look into the log file for further information
During initialization the error "name '_init_pyside_extension' is not defined" occurred in /home/stefan/mydata/freecad/.FreeCAD/Mod/sheetmetal/InitGui.py
Please look into the log file for further information
Traceback (most recent call last):
  File "signature_bootstrap.py", line 106, in bootstrap
  File "/home/stefan/.local/lib/python3.8/site-packages/shiboken2/__init__.py", line 30, in <module>
    _init_pyside_extension()
NameError: name '_init_pyside_extension' is not defined
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 72, in apport_excepthook
    from apport.fileutils import likely_packaged, get_recent_crashes
  File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in <module>
    from apport.report import Report
  File "/usr/lib/python3/dist-packages/apport/report.py", line 21, in <module>
    from urllib.request import urlopen
ImportError: cannot import name 'urlopen' from partially initialized module 'urllib.request' (most likely due to a circular import) (/usr/lib/python3.8/urllib/request.py)

Original exception was:
Traceback (most recent call last):
  File "signature_bootstrap.py", line 106, in bootstrap
  File "/home/stefan/.local/lib/python3.8/site-packages/shiboken2/__init__.py", line 30, in <module>
    _init_pyside_extension()
NameError: name '_init_pyside_extension' is not defined
Fatal Python error: could not initialize part 2
Python runtime state: initialized

Current thread 0x00007fdccf8fd100 (most recent call first):
  File "/usr/lib/python3.8/functools.py", line 51 in update_wrapper
  File "/usr/lib/python3.8/locale.py", line 109 in <module>
  File "<frozen importlib._bootstrap>", line 219 in _call_with_frames_removed
  File "<frozen importlib._bootstrap_external>", line 783 in exec_module
  File "<frozen importlib._bootstrap>", line 671 in _load_unlocked
  File "<frozen importlib._bootstrap>", line 975 in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 991 in _find_and_load
  File "/usr/lib/python3.8/calendar.py", line 10 in <module>
  File "<frozen importlib._bootstrap>", line 219 in _call_with_frames_removed
  File "<frozen importlib._bootstrap_external>", line 783 in exec_module
  File "<frozen importlib._bootstrap>", line 671 in _load_unlocked
  File "<frozen importlib._bootstrap>", line 975 in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 991 in _find_and_load
  File "/usr/lib/python3.8/email/_parseaddr.py", line 16 in <module>
  File "<frozen importlib._bootstrap>", line 219 in _call_with_frames_removed
  File "<frozen importlib._bootstrap_external>", line 783 in exec_module
  File "<frozen importlib._bootstrap>", line 671 in _load_unlocked
  File "<frozen importlib._bootstrap>", line 975 in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 991 in _find_and_load
  File "/usr/lib/python3.8/email/utils.py", line 33 in <module>
  File "<frozen importlib._bootstrap>", line 219 in _call_with_frames_removed
  File "<frozen importlib._bootstrap_external>", line 783 in exec_module
  File "<frozen importlib._bootstrap>", line 671 in _load_unlocked
  File "<frozen importlib._bootstrap>", line 975 in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 991 in _find_and_load
  File "/usr/lib/python3.8/email/_policybase.py", line 9 in <module>
  File "<frozen importlib._bootstrap>", line 219 in _call_with_frames_removed
  File "<frozen importlib._bootstrap_external>", line 783 in exec_module
  File "<frozen importlib._bootstrap>", line 671 in _load_unlocked
  File "<frozen importlib._bootstrap>", line 975 in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 991 in _find_and_load
  File "/usr/lib/python3.8/email/feedparser.py", line 27 in <module>
  File "<frozen importlib._bootstrap>", line 219 in _call_with_frames_removed
  File "<frozen importlib._bootstrap_external>", line 783 in exec_module
  File "<frozen importlib._bootstrap>", line 671 in _load_unlocked
  File "<frozen importlib._bootstrap>", line 975 in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 991 in _find_and_load
  File "/usr/lib/python3.8/email/parser.py", line 12 in <module>
  File "<frozen importlib._bootstrap>", line 219 in _call_with_frames_removed
  File "<frozen importlib._bootstrap_external>", line 783 in exec_module
  File "<frozen importlib._bootstrap>", line 671 in _load_unlocked
  File "<frozen importlib._bootstrap>", line 975 in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 991 in _find_and_load
  File "/usr/lib/python3.8/http/client.py", line 71 in <module>
  File "<frozen importlib._bootstrap>", line 219 in _call_with_frames_removed
  File "<frozen importlib._bootstrap_external>", line 783 in exec_module
  File "<frozen importlib._bootstrap>", line 671 in _load_unlocked
  File "<frozen importlib._bootstrap>", line 975 in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 991 in _find_and_load
  File "/usr/lib/python3.8/urllib/request.py", line 88 in <module>
  File "<frozen importlib._bootstrap>", line 219 in _call_with_frames_removed
  File "<frozen importlib._bootstrap_external>", line 783 in exec_module
  File "<frozen importlib._bootstrap>", line 671 in _load_unlocked
  File "<frozen importlib._bootstrap>", line 975 in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 991 in _find_and_load
  File "<frozen importlib._bootstrap>", line 219 in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1042 in _handle_fromlist
  File "<string>", line 26 in <module>
  File "<string>", line 131 in InitApplications
  File "<string>", line 201 in <module>
Aborted (core dumped)
so i thought ok - seems there is something getting in chaos with pyside..
lets uninstalled it:

Code: Select all

pip3 uninstall pyside2
and just to be sure restarted my system.
but the same error comes up.
i also installed the stable version:

Code: Select all

stefan@stefan-Zen:~$ sudo apt install freecad
[sudo] password for stefan: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  freecad-common freecad-python3 libfreecad-python3-0.19
Suggested packages:
  povray
The following NEW packages will be installed
  freecad freecad-common freecad-python3 libfreecad-python3-0.19
0 to upgrade, 4 to newly install, 0 to remove and 0 not to upgrade.
Need to get 49,4 MB of archives.
After this operation, 190 MB of additional disk space will be used.
Do you want to continue? [Y/n] 
Get:1 http://ppa.launchpad.net/freecad-maintainers/freecad-stable/ubuntu focal/main amd64 freecad-common all 2:0.19+dfsg1~202103010028~ubuntu20.04.1 [19,1 MB]
Get:2 http://ppa.launchpad.net/freecad-maintainers/freecad-stable/ubuntu focal/main amd64 libfreecad-python3-0.19 amd64 2:0.19+dfsg1~202103010028~ubuntu20.04.1 [30,2 MB]                                                                                                                                      
Get:3 http://ppa.launchpad.net/freecad-maintainers/freecad-stable/ubuntu focal/main amd64 freecad-python3 amd64 2:0.19+dfsg1~202103010028~ubuntu20.04.1 [48,5 kB]                                                                                                                                              
Get:4 http://ppa.launchpad.net/freecad-maintainers/freecad-stable/ubuntu focal/main amd64 freecad all 2:0.19+dfsg1~202103010028~ubuntu20.04.1 [35,0 kB]                                                                                                                                                        
Fetched 49,4 MB in 1min 8s (727 kB/s)                                                                                                                                                                                                                                                                          
Selecting previously unselected package freecad-common.
(Reading database ... 375382 files and directories currently installed.)
Preparing to unpack .../freecad-common_2%3a0.19+dfsg1~202103010028~ubuntu20.04.1_all.deb ...
Unpacking freecad-common (2:0.19+dfsg1~202103010028~ubuntu20.04.1) ...
Selecting previously unselected package libfreecad-python3-0.19.
Preparing to unpack .../libfreecad-python3-0.19_2%3a0.19+dfsg1~202103010028~ubuntu20.04.1_amd64.deb ...
Unpacking libfreecad-python3-0.19 (2:0.19+dfsg1~202103010028~ubuntu20.04.1) ...
Selecting previously unselected package freecad-python3.
Preparing to unpack .../freecad-python3_2%3a0.19+dfsg1~202103010028~ubuntu20.04.1_amd64.deb ...
Unpacking freecad-python3 (2:0.19+dfsg1~202103010028~ubuntu20.04.1) ...
Selecting previously unselected package freecad.
Preparing to unpack .../freecad_2%3a0.19+dfsg1~202103010028~ubuntu20.04.1_all.deb ...
Unpacking freecad (2:0.19+dfsg1~202103010028~ubuntu20.04.1) ...
Setting up libfreecad-python3-0.19 (2:0.19+dfsg1~202103010028~ubuntu20.04.1) ...
Setting up freecad-common (2:0.19+dfsg1~202103010028~ubuntu20.04.1) ...
Setting up freecad-python3 (2:0.19+dfsg1~202103010028~ubuntu20.04.1) ...
update-alternatives: using /usr/lib/freecad/bin/freecad-python3 to provide /usr/bin/freecad (freecad) in auto mode
Setting up freecad (2:0.19+dfsg1~202103010028~ubuntu20.04.1) ...
Processing triggers for mime-support (3.64ubuntu1) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for shared-mime-info (1.15-1) ...
Processing triggers for desktop-file-utils (0.24-1ubuntu3) ...
and the same error happens:

Code: Select all

stefan@stefan-Zen:~$ freecad
FreeCAD 0.19, Libs: 0.19R
© Juergen Riegel, Werner Mayer, Yorik van Havre and others 2001-2021
FreeCAD is free and open-source software licensed under the terms of LGPL2+ license.
FreeCAD wouldn't be possible without FreeCAD community.
  #####                 ####  ###   ####  
  #                    #      # #   #   # 
  #     ##  #### ####  #     #   #  #   # 
  ####  # # #  # #  #  #     #####  #   # 
  #     #   #### ####  #    #     # #   # 
  #     #   #    #     #    #     # #   #  ##  ##  ##
  #     #   #### ####   ### #     # ####   ##  ##  ##

Sheet Metal workbench loaded
Loading Assembly4 WorkBench
Interlocking laser cut workbench loaded
During initialization the error "name '_init_pyside_extension' is not defined" occurred in /usr/share/freecad/Mod/AddonManager/InitGui.py
Please look into the log file for further information
During initialization the error "name '_init_pyside_extension' is not defined" occurred in /usr/share/freecad/Mod/Arch/InitGui.py
Please look into the log file for further information
During initialization the error "name '_init_pyside_extension' is not defined" occurred in /usr/share/freecad/Mod/Draft/InitGui.py
Please look into the log file for further information
During initialization the error "name '_init_pyside_extension' is not defined" occurred in /usr/share/freecad/Mod/Tux/InitGui.py
Please look into the log file for further information
During initialization the error "name '_init_pyside_extension' is not defined" occurred in /home/stefan/mydata/freecad/.FreeCAD/Mod/lattice2/InitGui.py
Please look into the log file for further information
During initialization the error "name '_init_pyside_extension' is not defined" occurred in /home/stefan/mydata/freecad/.FreeCAD/Mod/A2plus/InitGui.py
Please look into the log file for further information
During initialization the error "name '_init_pyside_extension' is not defined" occurred in /home/stefan/mydata/freecad/.FreeCAD/Mod/sheetmetal/InitGui.py
Please look into the log file for further information
Traceback (most recent call last):
  File "signature_bootstrap.py", line 106, in bootstrap
  File "/home/stefan/.local/lib/python3.8/site-packages/shiboken2/__init__.py", line 30, in <module>
    _init_pyside_extension()
NameError: name '_init_pyside_extension' is not defined
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 72, in apport_excepthook
    from apport.fileutils import likely_packaged, get_recent_crashes
  File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in <module>
    from apport.report import Report
  File "/usr/lib/python3/dist-packages/apport/report.py", line 21, in <module>
    from urllib.request import urlopen
ImportError: cannot import name 'urlopen' from partially initialized module 'urllib.request' (most likely due to a circular import) (/usr/lib/python3.8/urllib/request.py)

Original exception was:
Traceback (most recent call last):
  File "signature_bootstrap.py", line 106, in bootstrap
  File "/home/stefan/.local/lib/python3.8/site-packages/shiboken2/__init__.py", line 30, in <module>
    _init_pyside_extension()
NameError: name '_init_pyside_extension' is not defined
Fatal Python error: could not initialize part 2
Python runtime state: initialized

Current thread 0x00007f4df8b23100 (most recent call first):
  File "/usr/lib/python3.8/functools.py", line 51 in update_wrapper
  File "/usr/lib/python3.8/locale.py", line 109 in <module>
  File "<frozen importlib._bootstrap>", line 219 in _call_with_frames_removed
  File "<frozen importlib._bootstrap_external>", line 783 in exec_module
  File "<frozen importlib._bootstrap>", line 671 in _load_unlocked
  File "<frozen importlib._bootstrap>", line 975 in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 991 in _find_and_load
  File "/usr/lib/python3.8/calendar.py", line 10 in <module>
  File "<frozen importlib._bootstrap>", line 219 in _call_with_frames_removed
  File "<frozen importlib._bootstrap_external>", line 783 in exec_module
  File "<frozen importlib._bootstrap>", line 671 in _load_unlocked
  File "<frozen importlib._bootstrap>", line 975 in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 991 in _find_and_load
  File "/usr/lib/python3.8/email/_parseaddr.py", line 16 in <module>
  File "<frozen importlib._bootstrap>", line 219 in _call_with_frames_removed
  File "<frozen importlib._bootstrap_external>", line 783 in exec_module
  File "<frozen importlib._bootstrap>", line 671 in _load_unlocked
  File "<frozen importlib._bootstrap>", line 975 in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 991 in _find_and_load
  File "/usr/lib/python3.8/email/utils.py", line 33 in <module>
  File "<frozen importlib._bootstrap>", line 219 in _call_with_frames_removed
  File "<frozen importlib._bootstrap_external>", line 783 in exec_module
  File "<frozen importlib._bootstrap>", line 671 in _load_unlocked
  File "<frozen importlib._bootstrap>", line 975 in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 991 in _find_and_load
  File "/usr/lib/python3.8/email/_policybase.py", line 9 in <module>
  File "<frozen importlib._bootstrap>", line 219 in _call_with_frames_removed
  File "<frozen importlib._bootstrap_external>", line 783 in exec_module
  File "<frozen importlib._bootstrap>", line 671 in _load_unlocked
  File "<frozen importlib._bootstrap>", line 975 in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 991 in _find_and_load
  File "/usr/lib/python3.8/email/feedparser.py", line 27 in <module>
  File "<frozen importlib._bootstrap>", line 219 in _call_with_frames_removed
  File "<frozen importlib._bootstrap_external>", line 783 in exec_module
  File "<frozen importlib._bootstrap>", line 671 in _load_unlocked
  File "<frozen importlib._bootstrap>", line 975 in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 991 in _find_and_load
  File "/usr/lib/python3.8/email/parser.py", line 12 in <module>
  File "<frozen importlib._bootstrap>", line 219 in _call_with_frames_removed
  File "<frozen importlib._bootstrap_external>", line 783 in exec_module
  File "<frozen importlib._bootstrap>", line 671 in _load_unlocked
  File "<frozen importlib._bootstrap>", line 975 in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 991 in _find_and_load
  File "/usr/lib/python3.8/http/client.py", line 71 in <module>
  File "<frozen importlib._bootstrap>", line 219 in _call_with_frames_removed
  File "<frozen importlib._bootstrap_external>", line 783 in exec_module
  File "<frozen importlib._bootstrap>", line 671 in _load_unlocked
  File "<frozen importlib._bootstrap>", line 975 in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 991 in _find_and_load
  File "/usr/lib/python3.8/urllib/request.py", line 88 in <module>
  File "<frozen importlib._bootstrap>", line 219 in _call_with_frames_removed
  File "<frozen importlib._bootstrap_external>", line 783 in exec_module
  File "<frozen importlib._bootstrap>", line 671 in _load_unlocked
  File "<frozen importlib._bootstrap>", line 975 in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 991 in _find_and_load
  File "<frozen importlib._bootstrap>", line 219 in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1042 in _handle_fromlist
  File "<string>", line 26 in <module>
  File "<string>", line 131 in InitApplications
  File "<string>", line 201 in <module>
Aborted (core dumped)
stefan@stefan-Zen:~$ 
then i tried with the current appimage FreeCAD_0.19-24276-Linux-Conda_glibc2.12-x86_64.AppImage

it starts up but shows the following errors -
and the gui seems very brocken....

Code: Select all

stefan@stefan-Zen:~/mydata/tools/FreeCAD$ ./FreeCAD_0.19-24276-Linux-Conda_glibc2.12-x86_64.AppImage 
FreeCAD 0.19, Libs: 0.19R24276 (Git)
© Juergen Riegel, Werner Mayer, Yorik van Havre and others 2001-2021
FreeCAD is free and open-source software licensed under the terms of LGPL2+ license.
FreeCAD wouldn't be possible without FreeCAD community.
  #####                 ####  ###   ####  
  #                    #      # #   #   # 
  #     ##  #### ####  #     #   #  #   # 
  ####  # # #  # #  #  #     #####  #   # 
  #     #   #### ####  #    #     # #   # 
  #     #   #    #     #    #     # #   #  ##  ##  ##
  #     #   #### ####   ### #     # ####   ##  ##  ##

Sheet Metal workbench loaded
Loading Assembly4 WorkBench
Interlocking laser cut workbench loaded
During initialization the error "name '_init_pyside_extension' is not defined" occurred in /tmp/.mount_FreeCAoenS7D/usr/Mod/AddonManager/InitGui.py
Please look into the log file for further information
During initialization the error "name '_init_pyside_extension' is not defined" occurred in /tmp/.mount_FreeCAoenS7D/usr/Mod/Arch/InitGui.py
Please look into the log file for further information
During initialization the error "name '_init_pyside_extension' is not defined" occurred in /tmp/.mount_FreeCAoenS7D/usr/Mod/Draft/InitGui.py
Please look into the log file for further information
During initialization the error "name '_init_pyside_extension' is not defined" occurred in /tmp/.mount_FreeCAoenS7D/usr/Mod/Tux/InitGui.py
Please look into the log file for further information
During initialization the error "name '_init_pyside_extension' is not defined" occurred in /home/stefan/mydata/freecad/.FreeCAD/Mod/lattice2/InitGui.py
Please look into the log file for further information
During initialization the error "name '_init_pyside_extension' is not defined" occurred in /home/stefan/mydata/freecad/.FreeCAD/Mod/A2plus/InitGui.py
Please look into the log file for further information
During initialization the error "name '_init_pyside_extension' is not defined" occurred in /home/stefan/mydata/freecad/.FreeCAD/Mod/sheetmetal/InitGui.py
Please look into the log file for further information
Traceback (most recent call last):
  File "signature_bootstrap.py", line 106, in bootstrap
  File "/home/stefan/.local/lib/python3.8/site-packages/shiboken2/__init__.py", line 30, in <module>
    _init_pyside_extension()
NameError: name '_init_pyside_extension' is not defined
During initialization the error "<method-wrapper '__get__' of getset_descriptor object at 0x7fbbf2ed2200> returned a result with an error set" occurred in /home/stefan/mydata/freecad/.FreeCAD/Mod/kicadStepUpMod/InitGui.py
Please look into the log file for further information
During initialization the error "name '_init_pyside_extension' is not defined" occurred in freecad.appimage
--------------------------------------------------------------------------------
Traceback (most recent call last):
  File "<string>", line 156, in InitApplications
  File "/tmp/.mount_FreeCAoenS7D/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 783, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/tmp/.mount_FreeCAoenS7D/usr/lib/python3.8/site-packages/freecad/appimage/init_gui.py", line 4, in <module>
    from PySide2 import QtWidgets, QtGui, QtCore
  File "/tmp/.mount_FreeCAoenS7D/usr/lib/python3.8/site-packages/PySide2/__init__.py", line 51, in <module>
    _setupQtDirectories()
  File "/tmp/.mount_FreeCAoenS7D/usr/lib/python3.8/site-packages/PySide2/__init__.py", line 21, in _setupQtDirectories
    import shiboken2
  File "/home/stefan/.local/lib/python3.8/site-packages/shiboken2/__init__.py", line 30, in <module>
    _init_pyside_extension()
NameError: name '_init_pyside_extension' is not defined
--------------------------------------------------------------------------------
name '_init_pyside_extension' is not defined
FreeCAD_AppImage_Crash__Screenshot_20210419_155442.png
FreeCAD_AppImage_Crash__Screenshot_20210419_155442.png (147.82 KiB) Viewed 1443 times
then i tried with renaming my user-config folder and starting the appimage again -
this lead to a starting freecad - juche -
the logs still very error heavy:

Code: Select all

stefan@stefan-Zen:~/mydata/tools/FreeCAD$ ./FreeCAD_0.19-24276-Linux-Conda_glibc2.12-x86_64.AppImage 
FreeCAD 0.19, Libs: 0.19R24276 (Git)
© Juergen Riegel, Werner Mayer, Yorik van Havre and others 2001-2021
FreeCAD is free and open-source software licensed under the terms of LGPL2+ license.
FreeCAD wouldn't be possible without FreeCAD community.
  #####                 ####  ###   ####  
  #                    #      # #   #   # 
  #     ##  #### ####  #     #   #  #   # 
  ####  # # #  # #  #  #     #####  #   # 
  #     #   #### ####  #    #     # #   # 
  #     #   #    #     #    #     # #   #  ##  ##  ##
  #     #   #### ####   ### #     # ####   ##  ##  ##

During initialization the error "name '_init_pyside_extension' is not defined" occurred in /tmp/.mount_FreeCAqWZ6G4/usr/Mod/AddonManager/InitGui.py
Please look into the log file for further information
During initialization the error "name '_init_pyside_extension' is not defined" occurred in /tmp/.mount_FreeCAqWZ6G4/usr/Mod/Arch/InitGui.py
Please look into the log file for further information
During initialization the error "name '_init_pyside_extension' is not defined" occurred in /tmp/.mount_FreeCAqWZ6G4/usr/Mod/Draft/InitGui.py
Please look into the log file for further information
During initialization the error "name '_init_pyside_extension' is not defined" occurred in /tmp/.mount_FreeCAqWZ6G4/usr/Mod/Tux/InitGui.py
Please look into the log file for further information
During initialization the error "name '_init_pyside_extension' is not defined" occurred in freecad.appimage
--------------------------------------------------------------------------------
Traceback (most recent call last):
  File "<string>", line 156, in InitApplications
  File "/tmp/.mount_FreeCAqWZ6G4/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 783, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/tmp/.mount_FreeCAqWZ6G4/usr/lib/python3.8/site-packages/freecad/appimage/init_gui.py", line 4, in <module>
    from PySide2 import QtWidgets, QtGui, QtCore
  File "/tmp/.mount_FreeCAqWZ6G4/usr/lib/python3.8/site-packages/PySide2/__init__.py", line 51, in <module>
    _setupQtDirectories()
  File "/tmp/.mount_FreeCAqWZ6G4/usr/lib/python3.8/site-packages/PySide2/__init__.py", line 21, in _setupQtDirectories
    import shiboken2
  File "/home/stefan/.local/lib/python3.8/site-packages/shiboken2/__init__.py", line 30, in <module>
    _init_pyside_extension()
NameError: name '_init_pyside_extension' is not defined
--------------------------------------------------------------------------------
Unknown command 'Std_AddonMgr'
Traceback (most recent call last):
  File "<string>", line 2, in <module>
  File "/tmp/.mount_FreeCAqWZ6G4/usr/Mod/Start/StartPage/StartPage.py", line 27, in <module>
    import six
  File "/home/stefan/.local/lib/python3.8/site-packages/six.py", line 320, in <module>
    moves = _MovedItems(__name__ + ".moves")
  File "/home/stefan/.local/lib/python3.8/site-packages/six.py", line 128, in __init__
    self.__doc__ = self.__class__.__doc__
<class 'SystemError'>: <method-wrapper '__get__' of getset_descriptor object at 0x7fcc9ec29dc0> returned a result with an error set
<method-wrapper '__get__' of getset_descriptor object at 0x7fcc9ec29dc0> returned a result with an error set
name '_init_pyside_extension' is not defined
Traceback (most recent call last):
  File "<string>", line 43, in Initialize
  File "/tmp/.mount_FreeCAqWZ6G4/usr/Mod/PartDesign/WizardShaft/WizardShaft.py", line 26, in <module>
    from PySide import QtCore, QtGui
  File "/tmp/.mount_FreeCAqWZ6G4/usr/Ext/PySide/__init__.py", line 2, in <module>
    from PySide2 import __version__
  File "/tmp/.mount_FreeCAqWZ6G4/usr/lib/python3.8/site-packages/PySide2/__init__.py", line 51, in <module>
    _setupQtDirectories()
  File "/tmp/.mount_FreeCAqWZ6G4/usr/lib/python3.8/site-packages/PySide2/__init__.py", line 21, in _setupQtDirectories
    import shiboken2
  File "/home/stefan/.local/lib/python3.8/site-packages/shiboken2/__init__.py", line 30, in <module>
    _init_pyside_extension()
and if i try to switch to the Part Design Workbench i get

Code: Select all

name '_init_pyside_extension' is not defined
hm so not usable anyway..



does anybody have any idea how to get this back to working?
i thought that the app-image version is fully isolated....
seems that is not really the case.



sunny greetings
stefan
user1234
Veteran
Posts: 3512
Joined: Mon Jul 11, 2016 5:08 pm

Re: FreeCAD won't start, even appimage after pySide2 install

Post by user1234 »

drmacro wrote: Mon Apr 19, 2021 1:51 pm FC never gets to the point of "test if Draft Workbench works correctly"...FC does not run it crashes, can't test anything.
Sorry, i missed that.
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: FreeCAD won't start, even appimage after pySide2 install

Post by looo »

s-light wrote: Mon Apr 19, 2021 2:08 pm Traceback (most recent call last):
File "signature_bootstrap.py", line 106, in bootstrap
File "/home/stefan/.local/lib/python3.8/site-packages/shiboken2/__init__.py", line 30, in <module>
_init_pyside_extension()
NameError: name '_init_pyside_extension' is not defined
you have a local installation of shiboken. This will hide the package within the appimage.
Post Reply