瀏覽代碼

Updating to match JSON parsed response from modifyRows

Andrej Studen 4 月之前
父節點
當前提交
7a794a39d6
共有 1 個文件被更改,包括 3 次插入3 次删除
  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