Python +;=不支持的操作数类型:';非类型';和';str';cx\U冻结后出现winappdbg错误

Python +;=不支持的操作数类型:';非类型';和';str';cx\U冻结后出现winappdbg错误,python,pywin32,cx-freeze,docstring,Python,Pywin32,Cx Freeze,Docstring,我使用cx_freeze来冻结myScript.py脚本,它在我的英文版win7 x64上运行良好,但在cx_冻结后,在中文版win7 x64上显示以下错误消息。我在vm中干净安装的英语win7 x64上运行了相同的冻结代码,没有发生错误 Traceback (most recent call last): File "C:\Python27\lib\site-packages\cx_Freeze\initscripts\Console.py", line 27, in <module

我使用cx_freeze来冻结myScript.py脚本,它在我的英文版win7 x64上运行良好,但在cx_冻结后,在中文版win7 x64上显示以下错误消息。我在vm中干净安装的英语win7 x64上运行了相同的冻结代码,没有发生错误

Traceback (most recent call last):
  File "C:\Python27\lib\site-packages\cx_Freeze\initscripts\Console.py", line 27, in <module>
  File "myScript.py", line 2, in <module>
  File "myScript.pyx", line 62, in init myScript (myScript.c:23212)
  File "C:\Python27\lib\site-packages\winappdbg\__init__.py", line 234, in <module>
  File "C:\Python27\lib\site-packages\winappdbg\breakpoint.py", line 66, in <module>
  File "C:\Python27\lib\site-packages\winappdbg\process.py", line 58, in <module>
  File "C:\Python27\lib\site-packages\winappdbg\disasm.py", line 631, in <module>
  File "C:\Python27\lib\site-packages\winappdbg\disasm.py", line 651, in Disassembler
TypeError: unsupported operand type(s) for +=: 'NoneType' and 'str'
我想如果我更改这行代码,并重新冻结代码,错误可能会消失。 但是为什么
\uuuu doc\uuuuuuu
这里没有?它不是包的docstring并且总是有一些东西吗


正如Thomas K在评论中指出的那样,冻结的Python代码通常是经过优化的,并且不包含docstring。WinAppDbg根本不是为该用例而设计的,因此您必须在那里(可能在更多的地方)对其进行修补


如果你碰巧做了那个补丁,请告诉我,这样我就可以合并它:)

用优化标志编译的Python代码字节已经去掉了docstring。但我不确定当一个冻结的exe在两台计算机之间移动时,这会发生什么变化。
# Add the list of supported disassemblers to the docstring.
__doc__ += "\n"
for e in engines:
__doc__ += " - %s - %s (U{%s})\n" % (e.name, e.desc, e.url)
del e