[SOLVED (again)] AppImage 0.19.18694 - During initialization the error "No module named 'freecad'" occurred

Having trouble installing or compiling FreeCAD? Get help here.
User avatar
Kunda1
Posts: 6214
Joined: Thu Jan 05, 2017 9:03 pm

Re: AppImage 0.19.18694 - During initialization the error "No module named 'freecad'" occurred

Postby Kunda1 » Sun Nov 24, 2019 12:39 pm

looo wrote:
Mon Nov 11, 2019 10:29 am
During initialization the error "No module named 'freecad'" occurred
During initialization the error "No module named 'freecad'" occurred
I'm seeing this again on FreeCAD_0.19-18775-Linux-Conda_Py3Qt5_glibc2.12-x86_64.AppImage

OS: Manjaro Linux (XFCE/xfce)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.18775 (Git) AppImage
Build type: Release
Branch: master
Hash: 9e93e621f9d5332114d29ea316f27aa6698eb70b
Python version: 3.7.3
Qt version: 5.12.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/United States (en_US)
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
User avatar
looo
Posts: 3010
Joined: Mon Nov 11, 2013 5:29 pm

Re: [REOPENED] AppImage 0.19.18694 - During initialization the error "No module named 'freecad'" occurred

Postby looo » Sun Nov 24, 2019 1:58 pm

Kunda1 wrote:
Sun Nov 24, 2019 12:39 pm
I'm seeing this again on FreeCAD_0.19-18775-Linux-Conda_Py3Qt5_glibc2.12-x86_64.AppImage
I can't reproduce. I tried with placing "import freecad" in a init_gui.py. Can you find the file which is related to this issue?
please help with my conda-packaging efforts: https://liberapay.com/looooo/
minimalistic blog: https://looooo.github.io/mini-blog/
chrisb
Posts: 20569
Joined: Tue Mar 17, 2015 9:14 am

Re: [REOPENED] AppImage 0.19.18694 - During initialization the error "No module named 'freecad'" occurred

Postby chrisb » Sun Nov 24, 2019 5:04 pm

I can see these messages as well in console, but FreeCAD runs nevertheless. One message comes right after starting the other shortly before the splash screen vanishes.

OS: Ubuntu 16.04.6 LTS (Unity/ubuntu)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.18775 (Git) AppImage
Build type: Release
Branch: master
Hash: 9e93e621f9d5332114d29ea316f27aa6698eb70b
Python version: 3.7.3
Qt version: 5.12.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/United States (en_US)
User avatar
looo
Posts: 3010
Joined: Mon Nov 11, 2013 5:29 pm

Re: [REOPENED] AppImage 0.19.18694 - During initialization the error "No module named 'freecad'" occurred

Postby looo » Wed Nov 27, 2019 10:20 am

@chrisb, @kunda would be nice to find out which workbench introduces these issues. I guess this is somehow related to the freecad.python package which is now included in the appimage / dmg.

Somehow there must be a way to make the freecad.python package optional but still allow to import freecad modules via the freecad-namespace (like "from freecad import app"). This is important to have multiple version of FreeCAD in the same system. Multiple versions of FreeCAD in one system simple conflicts with python packages where this is not possible and virtual envs are used to make multi-version-testing possible (If you think about it this makes a lot of sense, not only for python. A lot of packaging problems are based on multi-version installation...)
please help with my conda-packaging efforts: https://liberapay.com/looooo/
minimalistic blog: https://looooo.github.io/mini-blog/
User avatar
easyw-fc
Posts: 2720
Joined: Thu Jul 09, 2015 9:34 am

Re: [REOPENED] AppImage 0.19.18694 - During initialization the error "No module named 'freecad'" occurred

Postby easyw-fc » Wed Nov 27, 2019 11:15 am

looo wrote:
Wed Nov 27, 2019 10:20 am
@chrisb, @kunda would be nice to find out which workbench introduces these issues. I guess this is somehow related to the freecad.python package which is now included in the appimage / dmg.

Somehow there must be a way to make the freecad.python package optional but still allow to import freecad modules via the freecad-namespace (like "from freecad import app"). This is important to have multiple version of FreeCAD in the same system. Multiple versions of FreeCAD in one system simple conflicts with python packages where this is not possible and virtual envs are used to make multi-version-testing possible (If you think about it this makes a lot of sense, not only for python. A lot of packaging problems are based on multi-version installation...)
@looo
this is not related to external python workbenches...
It is related to the AppImage packaging
With the following recent AppImage and with a clean new FC profile, the errors still exist

Code: Select all

./FreeCAD_0.19-18775-Linux-Conda_Py3Qt5_glibc2.12-x86_64.AppImage
/tmp/.mount_FreeCAyEhjMc
FreeCAD 0.19, Libs: 0.19R18775 (Git)
© Juergen Riegel, Werner Mayer, Yorik van Havre 2001-2019
  #####                 ####  ###   ####  
  #                    #      # #   #   # 
  #     ##  #### ####  #     #   #  #   # 
  ####  # # #  # #  #  #     #####  #   # 
  #     #   #### ####  #    #     # #   # 
  #     #   #    #     #    #     # #   #  ##  ##  ##
  #     #   #### ####   ### #     # ####   ##  ##  ##

During initialization the error "No module named 'freecad'" occurred
During initialization the error "No module named 'freecad'" occurred
connect failed: No such file or directory

Code: Select all

OS: Linux Mint 19.1 (MATE/mate)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.18775 (Git) AppImage
Build type: Release
Branch: master
Hash: 9e93e621f9d5332114d29ea316f27aa6698eb70b
Python version: 3.7.3
Qt version: 5.12.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/United States (en_US)
User avatar
Kunda1
Posts: 6214
Joined: Thu Jan 05, 2017 9:03 pm

Re: [REOPENED] AppImage 0.19.18694 - During initialization the error "No module named 'freecad'" occurred

Postby Kunda1 » Thu Dec 05, 2019 9:57 pm

Can't reproduce anymore on FreeCAD_0.19-18829-Linux-Conda_Py3Qt5_glibc2.12-x86_64.AppImage
Thanks to whomever fixed it? (@looo ?)
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
User avatar
looo
Posts: 3010
Joined: Mon Nov 11, 2013 5:29 pm

Re: [SOLVED (again)] AppImage 0.19.18694 - During initialization the error "No module named 'freecad'" occurred

Postby looo » Fri Dec 06, 2019 7:16 am

@kunda I removed the freecad.python package at one point because of an error. Then this lead to this problem. In the meanwhile freecad.python was updated and I now added it back to the packages. Actually freecad from freecad-channel now depends on freecad.pytjon...
For the future I would like to get the package into the freecad-source so we can import freecad on all platforms without sys.path modifications.
Therefore it would be nice to have a proposal available but this currently is stuck:
https://github.com/FreeCAD/FreeCAD-Enha ... -Proposals

Is there any other way to write a proposal? On mantis?
please help with my conda-packaging efforts: https://liberapay.com/looooo/
minimalistic blog: https://looooo.github.io/mini-blog/
User avatar
Kunda1
Posts: 6214
Joined: Thu Jan 05, 2017 9:03 pm

Re: [SOLVED (again)] AppImage 0.19.18694 - During initialization the error "No module named 'freecad'" occurred

Postby Kunda1 » Fri Dec 06, 2019 8:41 am

looo wrote:
Fri Dec 06, 2019 7:16 am
@kunda I removed the freecad.python package at one point because of an error. Then this lead to this problem. In the meanwhile freecad.python was updated and I now added it back to the packages. Actually freecad from freecad-channel now depends on freecad.pytjon...
For the future I would like to get the package into the freecad-source so we can import freecad on all platforms without sys.path modifications.
Therefore it would be nice to have a proposal available but this currently is stuck:
https://github.com/FreeCAD/FreeCAD-Enha ... -Proposals

Is there any other way to write a proposal? On mantis?
Hmm.. yea.. we need to push the FEP model. Maybe this will be a good first issue?
I'd use mantis but based on what I just wrote, I'll see what I can do to create FEP for this.

Edit: started tracking at https://github.com/FreeCAD/FreeCAD-Enha ... s/issues/2
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features