remi-daigle / MarxanConnect

Marxan Connect
http://marxanconnect.ca/
MIT License
13 stars 5 forks source link

Error while Generating Connectivity Matrix with Custom Data #82

Open chrismallon opened 4 years ago

chrismallon commented 4 years ago

Description

While generating a connectivity matrix using Marxan Connect GUI 1.0.0 on Windows 10, an exception occurred which prevented the calculation of the connectivity matrix. This is related a previous issue, but raises a different type of exception.

Screenshots

Please include screenshots of the relevant tab of the app. image image

Debug Log

C:\Program Files (x86)\MarxanConnect Warning: Spatial files will be transformed to an equal-area projection (+proj=laea +lat_0=55.20843243813921 +lon_0=-110.25082869592748 +ellps=WGS84) for most spatial analyses Traceback (most recent call last): File "fiona/_shim.pyx", line 66, in fiona._shim.gdal_open_vector File "fiona/_err.pyx", line 259, in fiona._err.exc_wrap_pointer fiona._err.CPLE_OpenFailedError: \"C\Connectivity_Tests\ecosites_sub_area_3.shp": No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "MarxanConnectGUI.py", line 1068, in on_land_HAB_file File "site-packages\geopandas\geodataframe.py", line 181, in from_file File "site-packages\geopandas\io\file.py", line 71, in read_file File "site-packages\fiona\env.py", line 396, in wrapper File "site-packages\fiona__init.py", line 253, in open File "site-packages\fiona\collection.py", line 159, in init__ File "fiona/ogrext.pyx", line 467, in fiona.ogrext.Session.start File "fiona/_shim.pyx", line 73, in fiona._shim.gdal_open_vector fiona.errors.DriverError: \"C\Connectivity_Tests\ecosites_sub_area_3.shp": No such file or directory Traceback (most recent call last): File "fiona/_shim.pyx", line 66, in fiona._shim.gdal_open_vector File "fiona/_err.pyx", line 259, in fiona._err.exc_wrap_pointer fiona._err.CPLE_OpenFailedError: \"C\Connectivity_Tests\ecosites_sub_area_3.shp: No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "MarxanConnectGUI.py", line 1068, in on_land_HAB_file File "site-packages\geopandas\geodataframe.py", line 181, in from_file File "site-packages\geopandas\io\file.py", line 71, in read_file File "site-packages\fiona\env.py", line 396, in wrapper File "site-packages\fiona__init.py", line 253, in open File "site-packages\fiona\collection.py", line 159, in init__ File "fiona/ogrext.pyx", line 467, in fiona.ogrext.Session.start File "fiona/_shim.pyx", line 73, in fiona._shim.gdal_open_vector fiona.errors.DriverError: \"C\Connectivity_Tests\ecosites_sub_area_3.shp: No such file or directory Warning: Spatial files will be transformed to an equal-area projection (+proj=laea +lat_0=55.20843243813921 +lon_0=-110.25082869592748 +ellps=WGS84) for most spatial analyses Warning: Spatial files will be transformed to an equal-distance projection (+proj=eqdc +lat_1=55.17215391289655 +lat_2=55.24471096338188 +lon_0=-110.25082869592748 +ellps=WGS84) for this spatial analyses Warning: Error in habitatresistance2conmats Traceback (most recent call last): File "MarxanConnectGUI.py", line 1674, in on_land_generate_button File "site-packages\marxanconpy\spatial.py", line 345, in habitatresistance2conmats TypeError: add_edge() keywords must be strings

Files

Connectivity_Tests.zip

To Reproduce

To reproduce the error, follow the attached screenshots. Use pu_sub_area_3.shp as the planning unit shapefile (ID column label is PU_ID), and use ecosites_sub_area_3.shp as the habitat type shapefile (grid_code as habitat ID column). Attempt to generate the connectivity matrix with 'Landscape Input' as the connectivity input category, method set to Habitat Type + Isolation (Euclidean Distance).