在开发时patoolib没有任何问题,但当我将其打包成一个exe后,就开始报错了。
测试用的数据是一样的
target_zip是压缩包绝对路径,self.path_download是存放文件夹的绝对路径
patoolib.extract_archive(target_zip, outdir=self.path_download,verbosity=-1)
Traceback (most recent call last):
File "patoolib\__init__.py", line 553, in get_archive_cmdlist_func
File "importlib\__init__.py", line 127, in import_module
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 953, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 965, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'patoolib.programs'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "edownload.py", line 263, in run
File "edownload.py", line 141, in jieya
File "patoolib\__init__.py", line 684, in extract_archive
File "patoolib\__init__.py", line 472, in _extract_archive
File "patoolib\__init__.py", line 555, in get_archive_cmdlist_func
patoolib.util.PatoolError: No module named 'patoolib.programs'