浏览代码

Removing encoding from imageBrowser, now all JSON conversion is done by labkeyInterface

Andrej Studen 7 月之前
父节点
当前提交
bbf638cff4
共有 1 个文件被更改,包括 1 次插入3 次删除
  1. 1 3
      slicerModules/imageBrowser.py

+ 1 - 3
slicerModules/imageBrowser.py

@@ -751,10 +751,8 @@ class imageBrowserLogic(ScriptedLoadableModuleLogic):
         copyFields=[self.isetup['participantField'],'patientCode','visitCode','User']
         outRow={x:self.segmentationEntry[x] for x in copyFields}
         sList=self.isetup['datasets']['SegmentationsList']
-        resp=self.db.modifyRows('insert',sList['project'],
+        respJSON=self.db.modifyRows('insert',sList['project'],
             sList['schema'],sList['query'],[outRow])
-        encoding=chardet.detect(resp)['encoding']
-        respJSON=json.loads(resp.decode(encoding))
         outRow=respJSON['rows'][0]
         #print(outRow)