Skip to content

QuickPack hangs up on Unicode characters #9

@Lady-Natalya

Description

@Lady-Natalya
C:\Program Files (x86)\Steam\steamapps\common\Counter-Strike Global Offensive\csgo>QuickPack.py "C:\Program Files (x86)\Steam\steamapps\common\Counter-Strike Global Offensive\csgo\maps\zm_natalyas_cottage.bsp"
 
QuickPack v1.63 by Jackson Cannon - https://github.com/cannon/quickpack
 
Reading zm_natalyas_cottage.bsp...
Traceback (most recent call last):
  File "C:\Program Files (x86)\Steam\steamapps\common\Counter-Strike Global Offensive\csgo\QuickPack.py", line 612, in <module>
    main()
  File "C:\Program Files (x86)\Steam\steamapps\common\Counter-Strike Global Offensive\csgo\QuickPack.py", line 167, in main
    read_staticprop_lump(bsp_file)
  File "C:\Program Files (x86)\Steam\steamapps\common\Counter-Strike Global Offensive\csgo\QuickPack.py", line 529, in read_staticprop_lump
    prop = readcstr(bsp_file)
  File "C:\Program Files (x86)\Steam\steamapps\common\Counter-Strike Global Offensive\csgo\QuickPack.py", line 276, in readcstr
    return (b''.join(itertools.takewhile(b'\0'.__ne__, toeof))).decode("utf-8")
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x8c in position 2: invalid start byte

I don't know what needs to be done to fix this, but maybe a simple fix would be to add better error information? If I knew which file was causing the error to be thrown then maybe I could modify or delete it. I'd try to fix this myself and submit a PR, but I've never touched Python before, so I'm out of my element.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions