所以我去年使用 AutoPy 2 Exe 将带有附加文件的脚本放入一个可执行文件中。现在该应用程序需要第二个选项,添加它但是在为我的一生编译它之后我无法让它运行了。单击提交后,该应用程序不执行任何操作。我知道上次我遇到了带有附加文件的单一文件的问题。
这些文件被命名为:'97': './chromedriver97.exe'
并且我有推荐的代码
def resource_path(relative_path):
try:
# PyInstaller creates a temp folder and stores path in _MEIPASS
base_path = sys._MEIPASS
except Exception:
base_path = os.path.abspath(".")
return os.path.join(base_path, relative_path)
我使用的选项:选择文件,添加文件,添加徽标(工作)没有结果,然后尝试相同但添加了路径选项但仍然没有。它根本没有添加文件。
Error from console: FileNotFoundError: [WinError 2] The system cannot find the file specified