【发布时间】:2022-09-27 22:06:17
【问题描述】:
当我尝试编译我的代码时,我得到了这个错误 我有轮子模块和所有必要的模块 使用代码本身,一切都井井有条,我尝试编译其他程序并遇到相同的错误,我没有找到任何关于此的信息
Traceback (most recent call last):
File \"<frozen runpy>\", line 198, in _run_module_as_main
File \"<frozen runpy>\", line 88, in _run_code
File \"C:\\Users\\user\\AppData\\Local\\Programs\\Python\\Python311\\Scripts\\pyinstaller.exe\\__main__.py\", line 7, in <module>
File \"C:\\Users\\user\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\site-packages\\PyInstaller\\__main__.py\", line 107, in run
parser = generate_parser()
^^^^^^^^^^^^^^^^^
File \"C:\\Users\\user\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\site-packages\\PyInstaller\\__main__.py\", line 78, in generate_parser
import PyInstaller.building.build_main
File \"C:\\Users\\user\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\site-packages\\PyInstaller\\building\\build_main.py\", line 35, in <module>
from PyInstaller.depend import bindepend
File \"C:\\Users\\user\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\site-packages\\PyInstaller\\depend\\bindepend.py\", line 26, in <module>
from PyInstaller.depend import dylib, utils
File \"C:\\Users\\user\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\site-packages\\PyInstaller\\depend\\utils.py\", line 33, in <module>
from PyInstaller.depend import bytecode
File \"C:\\Users\\user\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\site-packages\\PyInstaller\\depend\\bytecode.py\", line 95, in <module>
_call_function_bytecode = bytecode_regex(rb\"\"\"
^^^^^^^^^^^^^^^^^^^^
File \"C:\\Users\\user\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\site-packages\\PyInstaller\\depend\\bytecode.py\", line 60, in bytecode_regex
pattern = re.sub(
^^^^^^^
File \"C:\\Users\\user\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\re\\__init__.py\", line 185, in sub
return _compile(pattern, flags).sub(repl, string, count)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File \"C:\\Users\\user\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\site-packages\\PyInstaller\\depend\\bytecode.py\", line 62, in <lambda>
lambda m: _instruction_to_regex(m[1].decode()),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File \"C:\\Users\\user\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\site-packages\\PyInstaller\\depend\\bytecode.py\", line 40, in _instruction_to_regex
return re.escape(bytes([dis.opmap[x]]))
~~~~~~~~~^^^
KeyError: \'CALL_FUNCTION\'
-
请修剪您的代码,以便更容易找到您的问题。按照这些准则创建minimal reproducible example。
标签: python-3.x compiler-errors pyinstaller