Ver código fonte

Updating to match JSON parsed response from modifyRows

Andrej Studen 2 meses atrás
pai
commit
7a794a39d6
1 arquivos alterados com 3 adições e 3 exclusões
  1. 3 3
      pythonScripts/statUtils.py

+ 3 - 3
pythonScripts/statUtils.py

@@ -235,10 +235,10 @@ def updateDatasetRows(db,project,dataset,rows,filterVars=['ParticipantId','Seque
         else:
             mode='insert'
             resp=db.modifyRows('insert',project,'study',dataset,[r])
-        encoding=chardet.detect(resp)['encoding']
-        respJSON=json.loads(resp.decode(encoding))
+        #encoding=chardet.detect(resp)['encoding']
+        #respJSON=json.loads(resp.decode(encoding))
         try:
+            print(resp['exception'])
             print(f'Using mode={mode}')
-            print(respJSON['exception'])
         except KeyError:
             pass