Browse Source

Updating to match JSON parsed response from modifyRows

Andrej Studen 2 months ago
parent
commit
7a794a39d6
1 changed files with 3 additions and 3 deletions
  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