Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Itzi-SWMM simulation: AttributeError: 'DrainageSimulation' object has no attribute 'swmm5' #104

Open
Caesar05 opened this issue Apr 25, 2022 · 2 comments

Comments

@Caesar05
Copy link

Hi everyone,
I tried to run the culvert modelling part of the Itzi tutorial by using the SWMM drainage model alongside the surface model.
Unfortunately I always recieve this error:

`GRASS nc_spm_08_grass7/PERMANENT:PERMANENT > itzi run parameter.ini
Starting simulation of parameter.ini...
WARNING: Error during execution: Traceback (most recent call last):
File "/home/julius/.local/lib/python3.8/site-packages/itzi-master/itzi/itzi.py", line 165, in sim_runner_worker
sim_runner.initialize(conf_file).run().finalize()
File "/home/julius/.local/lib/python3.8/site-packages/itzi-master/itzi/itzi.py", line 101, in initialize
self.sim.initialize()
File "/home/julius/.local/lib/python3.8/site-packages/itzi-master/itzi/simulation.py", line 144, in initialize
self.__set_models(self.igis)
File "/home/julius/.local/lib/python3.8/site-packages/itzi-master/itzi/simulation.py", line 118, in __set_models
self.drainage = DrainageSimulation(self.rast_domain,
File "/home/julius/.local/lib/python3.8/site-packages/itzi-master/itzi/drainage.py", line 39, in init
self.swmm5 = swmm.Swmm5()
File "/home/julius/.local/lib/python3.8/site-packages/itzi-master/itzi/swmm/swmm.py", line 37, in init
self.c_swmm5 = c.CDLL(swmm_so)
File "/usr/lib/python3.8/ctypes/init.py", line 373, in init
self._handle = _dlopen(self._name, mode)
OSError: /home/julius/.local/lib/python3.8/site-packages/itzi-master/itzi/swmm/swmm_c.so: cannot open shared object file: No such file or directory

Exception ignored in: <function DrainageSimulation.del at 0x7fa98a6fe0d0>
Traceback (most recent call last):
File "/home/julius/.local/lib/python3.8/site-packages/itzi-master/itzi/drainage.py", line 77, in del
self.swmm5.swmm_end()
AttributeError: 'DrainageSimulation' object has no attribute 'swmm5'
`

I already deleted the swmm_c.c and flow.c files and explicitly compiled them by using the programmers manual instruction. Nevertheless, this seems to be not the solution for my issue.

Thanks for your help in advance.

@peterpan89
Copy link

I am now facing exactly this issue. Does anyone have a solution for this? Thanks for your help.

@cam1331
Copy link

cam1331 commented Mar 6, 2024

Also facing the same issue in 2024, anyone found a solution to this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants