Parcourir la source

Updating to match JSON parsed response from modifyRows

Andrej Studen il y a 2 mois
Parent
commit
7a794a39d6
1 fichiers modifiés avec 3 ajouts et 3 suppressions
  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