Open rarygit opened 2 years ago
Solution in file inject.py:
don't use:
if sys.version_info[0] == 3:
instead:
from sys import version_info
if version_info[0] == 3:
This site was helpful:
https://stackoverflow.com/questions/9079036/how-do-i-detect-the-python-version-at-runtime
So now to the next problem: ValueError: Coordinates (1082700.0, 1077400.0) not found in subcatchments.
$ ostrich-swmm run -c submodel-ostrich-swmm-config.json
Traceback (most recent call last):
File "/media/l1nux/SAN240/conda_envs/envs/py3swmm/bin/ostrich-swmm", line 33, in
Maybe start with line 351 in file inject.py
line.append(sc_names_list[i]) #need to figure out how to grab subcat coordinates
OS: Ubuntu 20.04 pip3 venv = py3swmm python=v3.9 Is there an issue using python v3.9, rather than v3.8.3?
Trying to run ostrich-swmm for the first time, so any help appreciated.
I built and installed ostrich-swmm "lsmatott" in pip3 venv (the conda setup had too many conflicts) . I am following the tutorial documentation, using the *.inp file to run this test. I received the NameError: name 'sys' is not defined I checked the listed files at their respective lines, but could not find a solution
Attached are the input and config files and the swmm5 executable. Thanks for any help in getting this to run.
test_ostrich-swmm.zip
sh ostrich-swmm.sh Traceback (most recent call last): File "/media/l1nux/SAN240/py3venv/py3swmm/bin/ostrich-swmm", line 33, in
sys.exit(load_entry_point('ostrich-swmm==0.6.0', 'console_scripts', 'ostrich-swmm')())
File "/media/l1nux/SAN240/py3venv/py3swmm/lib/python3.9/site-packages/ostrich_swmm-0.6.0-py3.9.egg/ostrich_swmm/main.py", line 247, in main
File "/media/l1nux/SAN240/py3venv/py3swmm/lib/python3.9/site-packages/ostrich_swmm-0.6.0-py3.9.egg/ostrich_swmm/main.py", line 116, in run_cmd
File "/media/l1nux/SAN240/py3venv/py3swmm/lib/python3.9/site-packages/ostrich_swmm-0.6.0-py3.9.egg/ostrich_swmm/run.py", line 24, in perform_run
File "/media/l1nux/SAN240/py3venv/py3swmm/lib/python3.9/site-packages/ostrich_swmm-0.6.0-py3.9.egg/ostrich_swmm/inject.py", line 387, in perform_injection
File "/media/l1nux/SAN240/py3venv/py3swmm/lib/python3.9/site-packages/ostrich_swmm-0.6.0-py3.9.egg/ostrich_swmm/inject.py", line 171, in inject_parameters_into_input
File "/media/l1nux/SAN240/py3venv/py3swmm/lib/python3.9/site-packages/ostrich_swmm-0.6.0-py3.9.egg/ostrich_swmm/inject.py", line 55, in extract_subcatchment_polygons
NameError: name 'sys' is not defined