Преглед изворни кода

reassigning UnicodeDecodeError to global scope

Andrej пре 1 година
родитељ
комит
750ce8c3af
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      labkeyInterface.py

+ 1 - 1
labkeyInterface.py

@@ -146,7 +146,7 @@ class labkeyInterface:
         except AttributeError:
             print('Failed')
             return None
-        except chardet.UnicodeDecodeError:
+        except UnicodeDecodeError:
             encoding='ASCII'
             jsonData=json.loads(response.data.decode(encoding))