agent-python icon indicating copy to clipboard operation
agent-python copied to clipboard

Fix encoding error

Open haruhi0000 opened this issue 4 years ago • 1 comments

…guration

haruhi0000 avatar Dec 22 '21 13:12 haruhi0000

If the video card name contains special characters, the program will exit with an error. Example:

C:\Users>wmic path win32_VideoController get name
Name
Intel(R) HD Graphics 530
英伟达 GeForce GTX 950M
PS C:\agent> python .\hashtopolis
Found existing lock.pid, checking if python process is running...
Ignoring lock.pid file because PID is not existent anymore or not running python!
Starting client 's3-python-0.6.0'...
Collecting agent data...
Traceback (most recent call last):
  File "C:\Program Files\Python310\lib\runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Program Files\Python310\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "C:\agent\hashtopolis\__main__.py", line 342, in <module>
    init(args)
  File "C:\agent\hashtopolis\__main__.py", line 136, in init
    Initialize().run(args)
  File "C:\agent\hashtopolis\htpclient\initialize.py", line 25, in run
    self.__update_information()
  File "C:\agent\hashtopolis\htpclient\initialize.py", line 118, in __update_information
    output = output.decode(encoding="uft-8").replace("\r\n", "\n").split("\n")
LookupError: unknown encoding: uft-8

haruhi0000 avatar Dec 22 '21 14:12 haruhi0000