ItziModel / itzi

A dynamic GIS flood model
GNU General Public License v2.0
37 stars 17 forks source link

OSError: .../swmm_c.so: cannot open shared object file #98

Closed geoye closed 4 years ago

geoye commented 4 years ago

Hi, I met a trouble when I followed the tutorial to run the simulation. I took every step just as the tutorial did, but still went wrong. The tutorial website: https://itzi.readthedocs.io/en/latest/tutorial.html

Here is the error:

GRASS 7.8.3 (nc_spm_08_grass7):~/grassdata/nc_spm_08_grass7 > itzi run itzi2 Starting simulation of itzi2...
WARNING: Execution of itzi2 ended with an error
Simulation(s) complete. Elapsed times:
itzi2: 0:00:00
Total: 0:00:00
Average: 0:00:00
[Raster MASK present] GRASS 7.8.3 (nc_spm_08_grass7):~/grassdata/nc_spm_08_grass7 > itzi run itzi2 Starting simulation of itzi2...
WARNING: Error during execution: Traceback (most recent call last): File "/home/ye/.local/lib/python3.8/site-packages/itzi/itzi.py", line 165, in sim_runner_worker sim_runner.initialize(conffile).run().finalize() File "/home/ye/.local/lib/python3.8/site-packages/itzi/itzi.py", line 101, in initialize self.sim.initialize() File "/home/ye/.local/lib/python3.8/site-packages/itzi/simulation.py", line 144, in initialize self.__set_models(self.igis) File "/home/ye/.local/lib/python3.8/site-packages/itzi/simulation.py", line 118, in \_set_models self.drainage = DrainageSimulation(self.rastdomain, File "/home/ye/.local/lib/python3.8/site-packages/itzi/drainage.py", line 39, in __init__ self.swmm5 = swmm.Swmm5() File "/home/ye/.local/lib/python3.8/site-packages/itzi/swmm/swmm.py", line 37, in __init_\ self.c_swmm5 = c.CDLL(swmmso) File "/usr/lib/python3.8/ctypes/__init__.py", line 373, in __init_\ self._handle = _dlopen(self._name, mode) OSError: /home/ye/.local/lib/python3.8/site-packages/itzi/swmm/swmmc.so: cannot open shared object file: No such file or directory
Exception ignored in: <function DrainageSimulation.__del__ at 0x7fe403dee9d0> Traceback (most recent call last): File "/home/ye/.local/lib/python3.8/site-packages/itzi/drainage.py", line 77, in __del_\
self.swmm5.swmm_end() AttributeError: 'DrainageSimulation' object has no attribute 'swmm5'

I really do not know what should I do. I have tried to reinstall itzi pkg, but nothing happened. I also noticed that I do not have the _swmmc.so file in directory, but have the _swmm_c.cpython-38-x8664-linux-gnu.so in default. I changed its name into _swmmc.so, then I get:

WARNING: Execution of itzi2 ended with an error

I don't know how to handle this. Please give me some advice. Thanks a lot !!

lrntct commented 4 years ago

Thank you for the bug report. Since this is related to the swmm integration, I hope this could be solved in the next release that rely on pyswmm instead of including the whole swmm code base. However, this release is blocked for now due to missing dependencies in release channels (either conda-forge or pip). I hope this will be solved soon.

YuxuanGIS commented 4 years ago

Thank you for the bug report. Since this is related to the swmm integration, I hope this could be solved in the next release that rely on pyswmm instead of including the whole swmm code base. However, this release is blocked for now due to missing dependencies in release channels (either conda-forge or pip). I hope this will be solved soon.

Thank you! By the way, I have tried Python 2 to run itzi, then I succeeded!