Riverscapes / QRiS

Riverscapes Studio - for QGIS
https://qris.riverscapes.net
GNU General Public License v3.0
2 stars 0 forks source link

Failed attempt to `Run USGS StreamStats` for Temple Fork with Flow Statistics #138

Open joewheaton opened 2 years ago

joewheaton commented 2 years ago

I think we knew this was not working, but here is another example. Even if it doesn't work, we should do better on user expectation with prompts and more helpful warning and suggestions.

2022-10-22T10:52:02     WARNING    Traceback (most recent call last):
              File "C:\Users/joemw/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\qris_deploy\src\gp\stream_stats.py", line 193, in retrieve_flow_statistics
              flow_data = response.json()
              File "C:\PROGRA~1\QGIS32~1.3\apps\Python39\lib\site-packages\requests\models.py", line 898, in json
              return complexjson.loads(self.text, **kwargs)
              File "C:\PROGRA~1\QGIS32~1.3\apps\Python39\lib\site-packages\simplejson\__init__.py", line 525, in loads
              return _default_decoder.decode(s)
              File "C:\PROGRA~1\QGIS32~1.3\apps\Python39\lib\site-packages\simplejson\decoder.py", line 370, in decode
              obj, end = self.raw_decode(s)
              File "C:\PROGRA~1\QGIS32~1.3\apps\Python39\lib\site-packages\simplejson\decoder.py", line 400, in raw_decode
              return self.scan_once(s, idx=_w(s, idx).end())
             simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

             The above exception was the direct cause of the following exception:

             Traceback (most recent call last):
              File "C:\Users/joemw/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\qris_deploy\src\gp\stream_stats.py", line 115, in finished
              raise self.exception
              File "C:\Users/joemw/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\qris_deploy\src\gp\stream_stats.py", line 75, in run
              flow_stats = retrieve_flow_statistics(state_code, workspace_id)
              File "C:\Users/joemw/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\qris_deploy\src\gp\stream_stats.py", line 195, in retrieve_flow_statistics
              raise Exception('Error retrieving flow statistics') from ex
             Exception: Error retrieving flow statistics

https://youtu.be/9FF8SgMRwEM

joewheaton commented 2 years ago

Note, exact same request without flow statistics was successful.

philipbaileynar commented 1 year ago

@KellyMWhitehead assigning to you... The "Calculate Flow Statistics" option has never worked. Can you have a brief play. If you can't figure it out then simply remove the checkbox for 0.5 release. The basin characteristics work and are useful in their own right.

Screenshot 2023-04-03 at 4 40 38 PM
joewheaton commented 1 year ago

Please don't remove the checkbox, just disable it if you can't get it to work and add a tool tip "feature under development". The flow statistics are important to many people.