setup.pypy2exe:WindowsError:[錯誤267]的目錄名稱無效
from distutils.core import setup
import py2exe
setup(console=['program.py'])
錯誤
Traceback (most recent call last):
File "program.py", line 427, in <module>
File "program.py", line 242, in __init__
WindowsError: [Error 267] The directory name is invalid: 'C:\\Users\\Bob\applications\\Program\\test\\v0.6\\dist\\library.zip/*.*'
目錄名稱是指一個壓縮文件稱爲library
其位於dist文件夾中並在編譯期間創建。
行240 - 246 program.py
file_list = []
root_dir = sys.path[0]
for path in os.listdir(root_dir):
full_path = os.path.join(root_dir, path).lower()
if os.path.isfile(full_path) and full_path.endswith('txt'):
# create list of (filename, dir) tuples
file_list.append((path.lower(), full_path))
program.py
gui = GuiTk(win)
任何想法是什麼原因導致這個問題的427線?我使用Windows 7 64位和PortablePython 2.7.2.1來創建可執行文件。在編譯過程中沒有其他錯誤。
也許這是原因:「...... \\ library.zip/*.*」 – Dhara