jkall / qgis-midvatten-plugin

Midvatten plugin for QGIS
25 stars 8 forks source link

Calculating aveflow from Accvol not working #298

Closed JoeFra closed 5 years ago

JoeFra commented 5 years ago

Ett fel har inträffat vid Pythonexekvering:

TypeError: a bytes-like object is required, not 'str' Traceback (most recent call last): File "C:\Users\joel.AQUAFIRMS\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\midvatten\tools\w_flow_calc_aveflow.py", line 52, in self.pushButton_Selected.clicked.connect(lambda x: self.calcselected()) File "C:\Users\joel.AQUAFIRMS\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\midvatten\tools\w_flow_calc_aveflow.py", line 63, in calcselected self.calculateaveflow() File "C:\Users\joel.AQUAFIRMS\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\midvatten\tools\w_flow_calc_aveflow.py", line 70, in calculateaveflow sql= """select distinct obsid, instrumentid from(select * from w_flow where flowtype = "Accvol" and date_time >="%s" and date_time TypeError: a bytes-like object is required, not 'str'

Python version: 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) [MSC v.1914 64 bit (AMD64)] QGIS version: 3.4.4-Madeira Madeira, f6ddc62fdb

Python sökväg: C:/OSGEO4~2/apps/qgis/./python C:/Users/joel.AQUAFIRMS/AppData/Roaming/QGIS/QGIS3\profiles\default/python C:/Users/joel.AQUAFIRMS/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins C:/OSGEO4~2/apps/qgis/./python/plugins C:\OSGEO4~2\bin\python37.zip C:\OSGEO4~2\apps\Python37\DLLs C:\OSGEO4~2\apps\Python37\lib C:\OSGEO4~2\bin C:\OSGEO4~2\apps\Python37 C:\OSGEO4~2\apps\Python37\lib\site-packages C:/Users/joel.AQUAFIRMS/AppData/Roaming/QGIS/QGIS3\profiles\default/python C:\Users\joel.AQUAFIRMS\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\midvatten C:\Users\joel.AQUAFIRMS\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\midvatten\tools C:\Users\joel.AQUAFIRMS\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\midv_tolkn C:\Users\joel.AQUAFIRMS\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\midv_tolkn\tools M:/projekt/2962 Rockhammar kalkstensinfiltration