- edited description
TypeError: unhashable type: 'LinearRing'
- Imported Gerber copper layer - OK
- Generated Geometry - OK
- Selected Geometry Object - OK
- Create CNC Job - FAILED
[ERROR][Dummy-1] Abnormal termination of process!
[ERROR][Dummy-1] <type 'exceptions.TypeError'>
[ERROR][Dummy-1] unhashable type: 'LinearRing'
[ERROR][Dummy-1] <traceback object at 0x116a5d488>
Traceback (most recent call last):
File "/Users/master/Downloads/FlatCAM-8.3/FlatCAMWorker.py", line 32, in do_worker_task
task['fcn'](*task['params'])
File "/Users/master/Downloads/FlatCAM-8.3/FlatCAMObj.py", line 1069, in job_thread
app_obj.new_object("cncjob", outname, job_init)
File "/Users/master/Downloads/FlatCAM-8.3/FlatCAMApp.py", line 780, in new_object
initialize(obj, self)
File "/Users/master/Downloads/FlatCAM-8.3/FlatCAMObj.py", line 1059, in job_init
job_obj.generate_from_geometry_2(self, tolerance=0.0005)
File "/Users/master/Downloads/FlatCAM-8.3/camlib.py", line 2629, in generate_from_geometry_2
storage.insert(shape)
File "/Users/master/Downloads/FlatCAM-8.3/camlib.py", line 3541, in insert
self.indexes[obj] = idx
TypeError: unhashable type: 'LinearRing'
Platform:
OS X Yosemite version 10.10.5
python 2.7.10_2
shapely-1.5.13
Followed installation instructions on your site.
Comments (14)
-
reporter -
repo owner Can you please attach the gerber file that causes the problem and indicate the exact values entered when creating the geometry object and when generating the CNC Job?
Also please indicate which version of FlatCAM you were using. Was is a release or the development source?
-
reporter - attached Untitled Sketch_copperTop.gtl
The sample Gerber file on which FlatCAM version 8.3 and 8.4 (release) fails.
-
repo owner Please provide details on how you create the geometry (exact values and procedure) and the same for the CNC Job.
-
reporter I use default values, i.e. I do not change any values. Just click push buttons.
-
repo owner I tried your file and works for me. This probably has to do with your installation.
I just wrote a script that prints out all the versions of the packages that FlatCAM uses. Please run it and post the results here.
https://bitbucket.org/jpcgt/flatcam/raw/9c5b1971544c5240b59fb187d44af28f3bfe1602/sandbox/diagnose.py
Simply do:
python diagnose.py
-
repo owner These are my results (for which the problem does not occur):
Platform Linux 3.16.0-50-generic Distro ('Ubuntu', '14.04', 'trusty') Python 2.7.6 rtree 0.8.2 shapely 1.5.12 GEOS library (3, 4, 2) Qt 4.8.6 Numpy 1.9.2 MatPlotLib 1.4.3 MPL Numpy 1.6
-
reporter These are my results:
Platform Darwin 14.5.0 Distro ('', '', '') Python 2.7.10 rtree 0.8.2 shapely 1.5.13 GEOS library (3, 4, 2) Qt 4.8.7 Numpy 1.10.1 MatPlotLib 1.4.3 MPL Numpy 1.6
-
repo owner - edited description
-
repo owner - marked as critical
A feature in Shapely that FlatCAM uses has been removed. This will break several features in FlatCAM if upgrading Shapely beyond 1.5.12.
Specifically, geometries in shapely had a
__hash__
method, which permitted them to be indexes in a dictionary, ie.mydict[a_shappely_geo]
. Now that method has been removed.The workaround is to downgrade your Shapely version until this problem is fixed.
-
repo owner @yplaksyuk could you please try downgrading Shapely to 1.5.12? I think you just need to do
pip uninstall Shapely
, thenpip install -Iv Shapely==1.5.12
. -
reporter Yes, I've already done this. Now it works. Thanks!
-
repo owner - changed status to resolved
Solved in a679883.
@yplaksyuk could you please test it by upgrading shapely again?
pip install --upgrade Shapely
-
reporter @jpcgt, version 8.4.1 works fine. Thanks!
- Log in to comment