-
Notifications
You must be signed in to change notification settings - Fork 1.2k
KeyError: "There is no item named 'word/NULL' in the archive" #797
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi Kristen. This is a problem we see occasionally. Our best guess is that there is a Word plugin like maybe Small Business Productivity Pak or something like that which is not too careful about cleaning up after itself when it deletes things. Unfortunately there's no easy fix, but depending on your skill level and determination you can fix it. You can find some other issues related to it be searching Google with The way I would fix it on a single file would be to extract the package using There might be one or two more accessible ways if that sounds like Greek. Let us know how you go. |
Thanks for the quick reply. This all makes sense, I looked up some other issues too like you said, but I can't find |
Can you share the doc? You can send it to me by email if you want. Otherwise, I don't see how it could not be in there given where the exception is happening. Have you unzipped the .docx file and grep-ed it for "NULL"? |
Apologies - it worked. Don't know what I did wrong the first time. |
No worries, glad you got it working Kristen :) |
I get a similar error message: This is achieved by:
Then the hyperlink ends up like this, notice the
Now, in
This item bugs python-docx for me. I'll admit I'm using a 2.5-year-old version of the package, since I needed to modify stuff for my own usecase, so I am not sure whether this has been fixed after that. I was looking for whether this had been solved somehow, and it seems it is very much related to this issue. @scanny Do you reckon this is easily solved - and do you have any suggestions to how? I see in the |
@aorsten probably a separate ticket is best. You can refer to this one from there if you think this is related enough, but this seems like possibly an ambiguity in the spec rather than a (maybe) violation of it like the Make sure to include the stack trace in the report. The error seems to be coming from attempting to load the part, so wherever the code is deciding which relationships are loadable sounds like the right neighborhood. Probably in |
You can find a solution here-> |
I'm getting this error when opening an unremarkable looking Word file from a corpus of over 1K Word files which haven't had a problem. Opening it Word and saving it made no difference.
The text was updated successfully, but these errors were encountered: