Failed to start: cannot import name 'Close'
Issue #407
resolved
Hello, face a problem.
git clone, change to Beta
all python requirements are satisfied
pip3 install --user -r requirements.txt
shows all satisfied
flatcam_beta $ python3 FlatCAM.py
Traceback (most recent call last):
File "FlatCAM.py", line 6, in <module>
from FlatCAMApp import App
File "/home/admin1/cnc/flatcam_beta/FlatCAMApp.py", line 47, in <module>
from FlatCAMDB import ToolsDB2
File "/home/admin1/cnc/flatcam_beta/FlatCAMDB.py", line 4, in <module>
from camlib import to_dict
File "/home/admin1/cnc/flatcam_beta/camlib.py", line 55, in <module>
from flatcamParsers.ParseSVG import *
File "/home/admin1/cnc/flatcam_beta/flatcamParsers/ParseSVG.py", line 25, in <module>
from svg.path.path import Close
ImportError: cannot import name 'Close'
Very thanks for fast response for previous bugs.
Comments (4)
-
-
I’ve modified the requirements.txt file to reflect the need of at least version 4.0
From the Release Notes of svg.path package:
4.0 (2019-11-02)---------------- - Moved all the information from setup.py into setup.cfg. - Added a Close() command which is different from a Line() command in no way at all, to simplify the handling of closepath commands and subpaths. - Path()'s no longer have a `closed` attribute. - Now fully supports the SVG 1.1 "F.6.2 Out-of-range parameters" list. - Uses circular maths to calculate the length of circular arcs, more accurate and much faster.
-
- changed status to resolved
FlatCAM beta needs the dependency package svg.path with the version at least 4.0. I've updated the requirements.txt file to reflect this necessity.
-
reporter Thanks.
svg.path update solved the problem:
Under user. pip3 install --user -U svg.path Collecting svg.path Downloading https://files.pythonhosted.org/packages/d7/e4/0595a7d576ff26ab780ae8c30080f4e0bfc5c47d4402f02a925da85995e2/svg.path-4.0.2-py2.py3-none-any.whl Installing collected packages: svg.path Found existing installation: svg.path 3.0 Uninstalling svg.path-3.0: Successfully uninstalled svg.path-3.0 Successfully installed svg.path-4.0.2
- Log in to comment
Hi Andrei,
You are using Linux.
The Close class has been added in the latest version of the svg.path package.
It seems that the repositories are not up-to-date.
Try to install it like this:
There are other people who reported this and they did solved it like this.