FEM and python 3 issues

I think it is an external WB or script…
but i think it is FEM related: https://forum.freecadweb.org/viewtopic.php?p=267390#p267390

no it is not external, it is FreeCAD FEM …

damn I still have not joined the Py3 party on my Linux dev machine. I will have a look at this with a win py3 dev release of sgrogan.

bernd

FYI there is a Conda based AppImage available and therefore you don’t need Windows to test it.

Is there a way to edit files (.py) in the AppImage? Testing is great, but we are counting on bernd to fix it.

Sure.

downloaded.AppImage --appimage-extract
cd squashfs-root

You can navigate to content such as usr/Mod/Fem/module.py and do some modifications. To test the changes:

./AppRun

If you want to pack it again as an AppImage:

cd ..
wget "https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage"
chmod a+x appimagetool-x86_64.AppImage
./appimagetool-x86_64.AppImage squashfs-root

all this conda is like git. Once you have undersood it it’s simple but if not it not usable at all. Whereas I have understood git, i have not yet understood all this conda … May be it is because I have not given it a try. I will go for the win way ATM because it only needs 2 minutes to download the image.

bernd

@triplus wow, very cool! Thanks for sharing

Instructions above are not for using Conda. As AppImage is only based on Conda (packages). Therefore if you will follow the procedure as outlined above on downloaded AppImage:

downloaded.AppImage --appimage-extract
cd squashfs-root

https://github.com/FreeCAD/FreeCAD/releases

You don’t have to understand anything about Conda (or AppImage). You can start modifying .py files and test the changes by starting FreeCAD (located in the squashfs-root folder):

./AppRun

Mentioned procedure doesn’t modify your environment in any way. That is nothing gets installed and no environment paths get modified.

You’re welcome.

wow that sounds gread! but I need to install some package on my debian, do I? Which one, there is no package called appimage on debian stretch.

You get it from the downloads page https://github.com/freecad/freecad/releases

https://github.com/FreeCAD/FreeCAD/releases/download/0.18_pre/FreeCAD_0.18.15150_Conda_Py3Qt5_glibc2.12-x86_64.AppImage

No additional packages need to get installed. What is needed is already included in the AppImage. As @sgrogan pointed out therefore all you need to do is to download the AppImage from the FreeCAD GitHub releases page (and follow the procedure above).

P.S. Note that there are 2 AppImages on the releases page (Py2/Qt4 - PPA based and Py3/Qt5 - Conda based).

:open_mouth: :open_mouth: :open_mouth: I never knew it’s so easy … i really could’nt believe it :blush:

  • start FreeCAD
  • open FEM new solver example
  • double click on elmer solver
Traceback (most recent call last):
  File "/home/hugo/Desktop/AppImage/squashfs-root/usr/Mod/Fem/femsolver/solverbase.py", line 79, in setEdit
    machine = run.getMachine(vobj.Object)
  File "/home/hugo/Desktop/AppImage/squashfs-root/usr/Mod/Fem/femsolver/run.py", line 54, in getMachine
    _DocObserver.attach()
  File "/home/hugo/Desktop/AppImage/squashfs-root/usr/Mod/Fem/femsolver/run.py", line 334, in attach
    cls._instance = cls()
  File "/home/hugo/Desktop/AppImage/squashfs-root/usr/Mod/Fem/femsolver/run.py", line 326, in __init__
    for doc in App.listDocuments().itervalues():
<class 'AttributeError'>: 'dict' object has no attribute 'itervalues'

confirmed on:

OS: Debian GNU/Linux 9 (stretch)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.15150 (Git)
Build type: Release
Branch: master
Hash: fe8f172ce1f725cbc5e7a1538beaaac6a6529ec2
Python version: 3.6.6
Qt version: 5.6.2
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: German/Switzerland (de_CH)


partially joined the Py3 party :smiley:

Good to hear it is working. Thanks to all the hard work AppImage inventors did. Packaging work invested on PPA/Conda side. Travis related work macOS FreeCAD packaging team did in the past …

PR or it didn’t happen. :wink:

FYI, I’ve added this to Using_AppImages_in_your_Development_Workflow

Great.

:mrgreen: if the PR would be the one that counts I have joined month ago already … 42bfdf2 or 8de9707 or 656a669 IMHO joining the party for me means MY work and developing machine runs Py3 …

All this Python 3 partying going on lately. Hard to keep track! :sunglasses: