[SOLVED] No module named 'camotics'
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
[SOLVED] No module named 'camotics'
Colleagues,
I saw in git that there is some work being done on (?) integration or some kind of interaction with camotics. But apparently they forgot to "put" it in the dependency and even in the actual appimage
- Just in case - I'm not too lazy to compile (I don't need in normal cases) camotics -
pacman -Qs camotics
local/camotics-git r960.6942bd0-1
3axis NC machining simulation software
What am I doing wrong and how do I fix it?
I saw in git that there is some work being done on (?) integration or some kind of interaction with camotics. But apparently they forgot to "put" it in the dependency and even in the actual appimage
- Just in case - I'm not too lazy to compile (I don't need in normal cases) camotics -
pacman -Qs camotics
local/camotics-git r960.6942bd0-1
3axis NC machining simulation software
What am I doing wrong and how do I fix it?
Last edited by memfis on Sat Jul 02, 2022 12:36 pm, edited 2 times in total.
- sliptonic
- Veteran
- Posts: 3460
- Joined: Tue Oct 25, 2011 10:46 pm
- Location: Columbia, Missouri
- Contact:
Re: No module named 'camotics'
Camotics is a third party application. If it's installed on the machine, Path will detect it and enable another button on the toolbar.
Several things to note:
First, this requires Camotics 1.2.2 which is currently not released. The latest version available on their site is 1.2.0. 1.2.2 requires you to build from source.
Second, there have been several bug reports and PRs just this week improving the version detection. We were checking for the install before enabling the control but accidentally trying to import the library elsewhere in the GUI which caused an error.
Remember, this is all in the development/master branch so bugs, especially this early in the 0.21/1.0 cycle are to be expected.
Several things to note:
First, this requires Camotics 1.2.2 which is currently not released. The latest version available on their site is 1.2.0. 1.2.2 requires you to build from source.
Second, there have been several bug reports and PRs just this week improving the version detection. We were checking for the install before enabling the control but accidentally trying to import the library elsewhere in the GUI which caused an error.
Remember, this is all in the development/master branch so bugs, especially this early in the 0.21/1.0 cycle are to be expected.
Re: No module named 'camotics'
I used FreeCAD_weekly-builds-29365-2022-06-30-conda-Linux-x86_64-py310.AppImage, respectively counted on the "reference implementation". The error on the picture pops up according to the script -
1. running appimage
2. went to Path workbench
= saw the error.
I put camotics itself, built from source with git and it is version 1.2.2 - I will assume and suggest - do not rely on automatic version detection, but in the settings to provide the ability to explicitly specify the path to camotics.
1. running appimage
2. went to Path workbench
= saw the error.
I put camotics itself, built from source with git and it is version 1.2.2 - I will assume and suggest - do not rely on automatic version detection, but in the settings to provide the ability to explicitly specify the path to camotics.
- sliptonic
- Veteran
- Posts: 3460
- Joined: Tue Oct 25, 2011 10:46 pm
- Location: Columbia, Missouri
- Contact:
Re: No module named 'camotics'
Hmm. I'm not sure how to do this so it works with appimages.
The nature of the integration works in two ways. It uses a new python library. It also lets the user launch the full application with a project file created by Path.
I'm testing whether the camotics application is installed with
Code: Select all
subprocess.run(["camotics", "--version"])
If I import the python library and check the file path:
Code: Select all
>>> import camotics
>>> camotics.__file__
'/usr/lib/python3/dist-packages/camotics.so'
I could try importing the library only and checking the version with
Code: Select all
import camotics
>>> camotics.VERSION
(1, 2, 2)
Re: No module named 'camotics'
Workaround if camotics isn't installed:
If I edit Mod/Path/PathScripts/PathCamoticsGui.py and comment out everything, then the Path workbench works as before. I tested Profile, Pocket, Face.
If I edit Mod/Path/PathScripts/PathCamoticsGui.py and comment out everything, then the Path workbench works as before. I tested Profile, Pocket, Face.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Re: No module named 'camotics'
I might be misunderstanding something but I can't reproduce this. Path workbench loads in FreeCAD_weekly-builds-29365-2022-06-30-conda-Linux-x86_64-py310.AppImage.
The only thing missing is the CAMotics icon. But that's to be expected since the camotics module isn't bundled with the AppImage.
Re: No module named 'camotics'
The latest available here is:
Code: Select all
OS: macOS 10.16
Word size of FreeCAD: 64-bit
Version: 0.21.29321 (Git)
Build type: Release
Branch: master
Hash: 8ee773362e08d703bce9cfdcefd8e4ad424a7d44
Python 3.10.5, Qt 5.12.9, Coin 4.0.0, Vtk 9.1.0, OCC 7.5.3
Locale: C/Default (C)
Installed mods:
* FC_SU
* DynamicData 2.46.0
* FeedsAndSpeeds 0.4.0
* fcgear
* Manipulator 1.4.3
* fasteners
* sheetmetal
* ExplodedAssembly
* Curves 0.3.0
* Assembly4 0.11.12
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Re: No module named 'camotics'
sliptonic wrote: ↑Thu Jun 30, 2022 9:23 pm Hmm. I'm not sure how to do this so it works with appimages.
The nature of the integration works in two ways. It uses a new python library. It also lets the user launch the full application with a project file created by Path.
I'm testing whether the camotics application is installed withThat returns the version of the installed application. On my linux box the binary is /usr/bin/camotics. Based on that, I'm assuming the python library is also available and in the python path.Code: Select all
subprocess.run(["camotics", "--version"])
If I import the python library and check the file path:Code: Select all
>>> import camotics >>> camotics.__file__ '/usr/lib/python3/dist-packages/camotics.so'
Everything is not what it seems
Code: Select all
pacman -Qs camotics
local/camotics-git r960.6942bd0-1
3-axis NC machining simulation software
find / -name camotics.so
mkdir /usr/lib/python3/dist-packages
/home/user/.cache/pikaur/build/camotics-git/src/camotics/build/camotics.so
ln -s /home/user/.cache/pikaur/build/camotics-git/src/camotics/build/camotics.so /usr/lib/python3/dist-packages/
ll /usr/lib/python
python2.7/ python3/ python3.10/ python3.8/
So if you were looking for a library in python3, I created this directory, along with the necessary nested one. And it still doesn't detect it.
Re: No module named 'camotics'
I think we should take the quick and easy way - to specify the path to the desired file directly in Preferences
- sliptonic
- Veteran
- Posts: 3460
- Joined: Tue Oct 25, 2011 10:46 pm
- Location: Columbia, Missouri
- Contact:
Re: No module named 'camotics'
If the problem is locating the binary executable, then maybe. If it's the location of the python library, then it seems like the system is broken. The assumption on any python import is that the library is in the PYTHONPATH.