Open muc-martin opened 4 years ago
Could the error be possibly due to pyshp being version 2.x instead 1.x? After downgrading pyshp to 1.2.12 I get following error:
File "H:\Anaconda\envs\livestock_env\lib\site-packages\livestock\hydrology.py", line 606, in run_model project, mesh_info = mesh_to_cells(project, mesh_paths) File "H:\Anaconda\envs\livestock_env\lib\site-packages\livestock\hydrology.py", line 55, in mesh_to_cells polygon.height, polygon.id) File "H:\Anaconda\envs\livestock_env\lib\site-packages\cmf\geometry\geocell.py", line 48, in create_cell c = project.NewCell(*center, area=polygon.area, with_surfacewater=with_surfacewater) RuntimeError: Can't create cell #0. Area<=0.0
Hi @HerrHansDampf I haven't used Livestock since sometime in 2018. So it is very likely that the dependencies are not working.
Hi @ocni-dtu , do you by any chance still have the conda environment you worked with, so I can reproduce it? Attached is my cmf folder as well as the debug info cmf.zip livestock_debug.log
@Martin-TUM it says in the traceback that the area of the cell is less than 0. Can you check that your geometry is correct?
I unfortunately doesn't have the environment anymore. Try to use a version of CMF before 1.2. It looks like they changed how the handled geotry in 1.2: https://github.com/philippkraft/cmf/releases
I checked the geometry and it is a valid .obj file with all geometry included. Downgrading CMF to 1.1.1 (or lower) results in the following error:
Traceback (most recent call last):
File "C:\livestock\Examples1\CMF_Slope_v1\cmf\cmf_template.py", line 2, in
I installed livestock and anaconda according to the following tutorial https://kongsgaard.eu/install-livestock.html. However, I cannot get the example files to work as I get the following error.
from livestock.hydrology import run_model File "H:\Anaconda\envs\livestock_env\lib\site-packages\livestock\hydrology.py", line 22, in
from livestock import geometry as lg
File "H:\Anaconda\envs\livestock_env\lib\site-packages\livestock\geometry.py", line 261, in
-> shapefile._Shape:
AttributeError: module 'shapefile' has no attribute '_Shape'