Beta - Linux - svg.path can't find object 'Move'

Issue #385 resolved
Rémi Devau created an issue

Hello,

I’m using Ubuntu 18.04 and I’m not able to launch the Beta (fresh git pull) as is.
With a clean OS install, using setup_ubuntu and requirements.txt, I get this:

~/flatcam$ python3 FlatCAM.py
Traceback (most recent call last):
File "FlatCAM.py", line 6, in <module>
from FlatCAMApp import App
File "/home/cz/flatcam/FlatCAMApp.py", line 50, in <module>
from ObjectCollection import *
File "/home/cz/flatcam/ObjectCollection.py", line 19, in <module>
from FlatCAMObj import FlatCAMGerber, FlatCAMGeometry, FlatCAMExcellon, FlatCAMCNCjob, FlatCAMDocument, FlatCAMScript
File "/home/cz/flatcam/FlatCAMObj.py", line 28, in <module>
from FlatCAMCommon import LoudDict
File "/home/cz/flatcam/FlatCAMCommon.py", line 16, in <module>
from camlib import to_dict
File "/home/cz/flatcam/camlib.py", line 51, in <module>
from flatcamParsers.ParseSVG import *
File "/home/cz/flatcam/flatcamParsers/ParseSVG.py", line 24, in <module>
from svg.path.path import Move

But if I remove line 24 in flatcam/flatcamParsers/ParseSVG.py, everything is fine…
Did I miss something?

Comments (7)

  1. Marius Stanciu

    Hi Remi,

    Make sure you use the latest version of the svg.path Python module. For Ubuntu:

    pip3 install svg.path --upgrade
    

  2. Rémi Devau reporter

    Hi Marius,

    I already did that:
    cz@cz-X220:~/flatcam$ pip3 install --upgrade svg.path
    Defaulting to user installation because normal site-packages is not writeable
    Requirement already up-to-date: svg.path in /usr/local/lib/python3.6/dist-packages (4.0.2)

    I tried uninstall/install, with or without sudo. No luck.

  3. Marius Stanciu

    The Move class is available in the svg.path.path

    Check inside the svg folder you have at least one file named “__init__.py”. If you don’t have it, create an empty one but using that name.

    In Windows is like this:

  4. Rémi Devau reporter

    The file is here.
    I can see the class in path.py…

    Anyway, I’ll try one more time with a new VM, (I have to admit I had some issue during python setup in last one)

    Thank you for your support!

    Regards

  5. Marius Stanciu

    Also try to use Python 3.7.
    I did made a try with Python 3.8 and there are at least some problems when issuing sys.exit(0) command. Who knows … there may be others in the different modules that are compiled for Python 3.8 …

  6. Marius Stanciu

    It was confirmed by an user in the Discussions forum on FlatCAM.org that the problem was solved by replacing the svg.path.path file by the one in the svg.path GIT repository, meaning this one: https://github.com/regebro/svg.path/blob/master/src/svg/path/path.py

    It seems that this is an issue of packing of the svg.path module in the used Linux repository. It is not a FlatCAM beta problem.

    LE:
    This is what user @lewbie has written on the mentioned forum:

    In Ubuntu 18.04 ,

    the path.py file of svg.path package which is installed by pip3 or apt-get did not contain class Move() section.
    The path.py file obtained from github (regebro/…/path) contained the Move() section.

    I copied the file into /usr/lib/python3/dist-packages/svg/path directory.

    the problem solved

  7. Rémi Devau reporter

    ha! it’s /usr/lib !
    And not /usr/local/lib… My eyes didn’t want to see that /usr/lib/python3 was before everything else in my sys.path… and I never had a look in this folder.

    It’s working now, thank you very much!

  8. Log in to comment