By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,983 Members | 1,717 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,983 IT Pros & Developers. It's quick & easy.

docx.opc.exceptions.PackageNotFoundError

P: 3
Hi ,


I am getting the error (docx.opc.exceptions.PackageNotFoundError: Package not found at ...\dist\docx1.exe\docx\templates\default.docx')

while executing exe for python.I have generated a exe using python code for docx . I have used the following import(from docx import Document)

I am using Py2Nsis in generating exe.

Pls anybody can help

Thanks,
Arun
Mar 7 '15 #1
Share this Question
Share on Google+
3 Replies


bvdet
Expert Mod 2.5K+
P: 2,851
You should consult documentation for py2Nsis. It appears your imports are not being packaged. Perhaps you should attempt to make your exe with py2exe or pyinstaller. I have used pyinstaller, and there is an active community supporting it.
Mar 7 '15 #2

P: 3
I am getting the same error while using pyinstaller/py2exe

below is the error :

Traceback (most recent call last):
File "<string>", line 20, in <module>
File "C:\Python27\PyInstaller\build\Folder_name\out 00-PYZ.pyz\docx.ap
i", line 25, in Document
File "C:\Python27\PyInstaller\build\Folder_name\out 00-PYZ.pyz\docx.op
c.package", line 116, in open
File "C:\Python27\PyInstaller\build\Folder_name\out 00-PYZ.pyz\docx.op
c.pkgreader", line 32, in from_file
File "C:\Python27\PyInstaller\build\Folder_name\out 00-PYZ.pyz\docx.op
c.phys_pkg", line 31, in __new__
docx.opc.exceptions.PackageNotFoundError: Package not found at 'C:\Python27\PYIN
ST~1\dist\ADA_TE~1\docx\templates\default.docx'
Mar 8 '15 #3

bvdet
Expert Mod 2.5K+
P: 2,851
I suggest posting to the "PyInstaller" group. The group can be found here.
Mar 9 '15 #4

Post your reply

Sign in to post your reply or Sign up for a free account.