diff --git a/pym/calculate/lib/utils/files.py b/pym/calculate/lib/utils/files.py index 9288db5..a423f8d 100644 --- a/pym/calculate/lib/utils/files.py +++ b/pym/calculate/lib/utils/files.py @@ -283,7 +283,10 @@ class process(StdoutableProcess): else: for line in self.readByLine(): pass - return self.cacheresult.decode(encoding="UTF-8") + try: + return self.cacheresult.decode(encoding="UTF-8") + except UnicodeDecodeError as e: + return self.cacheresult.decode(encoding="UTF-16") except KeyboardInterrupt: self.kill() raise KeyboardInterrupt