Riverscapes / QRiS

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

StreamStats Command some things Worked, Others Did Not #112

Closed joewheaton closed 6 days ago

joewheaton commented 1 year ago

Video: https://youtu.be/pFn3Lj-1MXE

Also, where are the flow statistics? GIS data is good.

Initial Error when I chose point and tried to have it do everything:

It returned nothing (not even catchment , but error mesage:

2022-09-21T12:56:33     INFO    Started Test Watershed Stream Stats API Request 
2022-09-21T12:57:41     CRITICAL    Stream Statistics API Request "Test Watershed Stream Stats API Request at -111.66242676445425, 41.76846657924111" Exception: Error retrieving flow statistics

Error when trying to do full statistics for a Small watershed up on hillslope

An error has occurred while executing Python code: 

Exception: Error retrieving flow statistics 
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

Python version: 3.9.5 (tags/v3.9.5:0a7dcbd, May  3 2021, 17:27:52) [MSC v.1928 64 bit (AMD64)] 
QGIS version: 3.24.3-Tisler Tisler, cf22b74e 

Python Path:
C:/PROGRA~1/QGIS32~1.3/apps/qgis/./python
C:/Users/joemw/AppData/Roaming/QGIS/QGIS3\profiles\default/python
C:/Users/joemw/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins
C:/PROGRA~1/QGIS32~1.3/apps/qgis/./python/plugins
C:\Program Files\QGIS 3.24.3\bin\python39.zip
C:\PROGRA~1\QGIS32~1.3\apps\Python39\DLLs
C:\PROGRA~1\QGIS32~1.3\apps\Python39\lib
C:\Program Files\QGIS 3.24.3\bin
C:\PROGRA~1\QGIS32~1.3\apps\Python39
C:\PROGRA~1\QGIS32~1.3\apps\Python39\lib\site-packages
C:\PROGRA~1\QGIS32~1.3\apps\Python39\lib\site-packages\GDAL-3.4.3-py3.9-win-amd64.egg
C:\PROGRA~1\QGIS32~1.3\apps\Python39\lib\site-packages\win32
C:\PROGRA~1\QGIS32~1.3\apps\Python39\lib\site-packages\win32\lib
C:\PROGRA~1\QGIS32~1.3\apps\Python39\lib\site-packages\Pythonwin
C:/Users/joemw/AppData/Roaming/QGIS/QGIS3\profiles\default/python
philipbaileynar commented 1 year ago

I can handle the error. But I have had little success getting the flow statistics API call to work.