Open TheDude005 opened 7 years ago
Normally the file is created by the swmm executable that is set in the config. Could you try running (after the .inp is created) the command:
swmm file.inp file.out
Sorry it took so long to get back to you, a lot came up.
So I ran this command
jordan@GISServer:~/swmm$ ./swmm5 /home/jordan/.qgis2/processing/outputs/swmm.inp /home/jordan/.qgis2/processing/outputs/swmm.out
and got this result
`... EPA-SWMM 5.1 (Build 5.1.012)
o Retrieving project data
o Simulation complete
o Writing output report
... EPA-SWMM completed in 0.00 seconds.`
That doesn't look like a lot of output... namely there is no actual result if what you are showing is the contend of the output file.
No it filled out an output file it was rather long so I just quoted the CLI
The plugin should be able to do the same then.
I saw previously someone had this issue because of time stamps and saw that you had corrected the code. When I run the plugin with sample data it will create the swmm.inp but not the swmm.out, with a log message of 2017-04-16T00:46:35 2 Uncaught error while executing algorithm Traceback (most recent call last): File "/usr/share/qgis/python/plugins/processing/core/GeoAlgorithm.py", line 203, in execute self.processAlgorithm(progress) File "/home/jordan/.qgis2/python/plugins/qgis-swmm/SwmmAlgorithm.py", line 254, in processAlgorithm f = codecs.open(filename,'w',encoding='utf-8') File "/usr/lib/python2.7/codecs.py", line 896, in open file = builtin.open(filename, mode, buffering) IOError: [Errno 13] Permission denied: u'/home/jordan/.qgis2//processing/outputs/swmm.inp'
2017-04-16T00:47:02 0 /bin/sh: 1: /home/jordan/swmm: Permission denied
2017-04-16T00:47:02 2 Uncaught error while executing algorithm Traceback (most recent call last): File "/usr/share/qgis/python/plugins/processing/core/GeoAlgorithm.py", line 203, in execute self.processAlgorithm(progress) File "/home/jordan/.qgis2/python/plugins/qgis-swmm/SwmmAlgorithm.py", line 371, in processAlgorithm total_size = os.path.getsize(outfilename) File "/usr/lib/python2.7/genericpath.py", line 57, in getsize return os.stat(filename).st_size OSError: [Errno 2] No such file or directory: '/home/jordan/.qgis2//processing/outputs/swmm.out'
Now I have looked at the permissions for that folder and set all of them to anyone including on each of the executable files within the swmm folder. I have also tried running QGIS under sudo to see if that would work and it has not. I tried creating an empty swmm.out file and running the plugin and received empty output with this from the log 2017-04-16T00:58:13 0 /bin/sh: 1: /home/jordan/swmm: Permission denied
Obviously there is something in the permissions where it will create the swmm.inp file but when processing it has issues with creating and populating the swmm.out file, I am running this on Ubuntu 16.04 with QGIS 2.18.6