Skip to content
This repository has been archived by the owner on Jun 3, 2020. It is now read-only.

no output file #10

Open
TheDude005 opened this issue Apr 16, 2017 · 5 comments
Open

no output file #10

TheDude005 opened this issue Apr 16, 2017 · 5 comments

Comments

@TheDude005
Copy link

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

@vmora
Copy link
Contributor

vmora commented Apr 18, 2017

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

@TheDude005
Copy link
Author

TheDude005 commented May 11, 2017

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.`

@vmora
Copy link
Contributor

vmora commented May 15, 2017

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.

@TheDude005
Copy link
Author

No it filled out an output file it was rather long so I just quoted the CLI

@vmora
Copy link
Contributor

vmora commented May 17, 2017

The plugin should be able to do the same then.

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

No branches or pull requests

2 participants