Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Refactor parse_xml function to handle external target references (Issue #1349)#1350

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
al-rahul wants to merge1 commit intopython-openxml:master
base:master
Choose a base branch
Loading
fromal-rahul:master

Conversation

al-rahul
Copy link

The added code checks if self.target_ref exists and if it starts with a "#", which is a common way to denote external references. If both conditions are met, the method returns RTM.EXTERNAL, indicating that the target reference is external.

This change improves the robustness of our code by correctly handling and classifying external references. This will prevent potential errors or unexpected behavior when encountering such references.

SebG-js and TommasoPetrolito reacted with thumbs up emoji
@SebG-js
Copy link

SebG-js commentedMar 17, 2025
edited
Loading

Hello
I met this issue.
It could be interesting to get this fix in the main branch.

defgetinfo(self,name):"""Return the instance of ZipInfo given 'name'."""info=self.NameToInfo.get(name)ifinfoisNone:>raiseKeyError('There is no item named %r in the archive'%name)EKeyError:"There is no item named 'word/#schémaglobal' in the archive"

@schwaxpl
Copy link

Hello
I met this issue.
Would be great to apply the known fix :)

SebG-js reacted with thumbs up emoji

@SebG-js
Copy link

Hello@al-rahul
Thank you for the fix.
Could you resolve the conflicts ?
I am interested by the fix in the master branch.

@al-rahul
Copy link
Author

Hello@al-rahul Thank you for the fix. Could you resolve the conflicts ? I am interested by the fix in the master branch.

I've made a pull request already, but the repo owner seems to be inactive and hasn't touched it in more than a year.

@SebG-js
Copy link

Hello@scanny
@al-rahul proposed an interesting fix.
Are you an active contributor of this project ?
Could you help us ?

Maybe the repo owner can add new active contributors ?

TommasoPetrolito reacted with thumbs up emoji

@TommasoPetrolito
Copy link

+1 I also faced a similar issue and I tried the change of this PR and it works. Please, it would be very useful if the proposed PR could get merged.

@TommasoPetrolito
Copy link

@scanny you appear to be the#1 contributor in this repository, can you please have a look to this PR and let us know if this can get merged?

@TommasoPetrolito
Copy link

@ondrej-111 if@scanny can't, can you maybe help with this?

@TommasoPetrolito
Copy link

Possible temporary fixes, in your requirements.txt instead of python-docx==1.1.2 or similar, use instead:

OPTION A:
python-docx @ git+https://github.com/al-rahul/python-docx.git@4ebb3ac
Thank you@al-rahul

OPTION B:
python-docx @ git+https://github.com/TommasoPetrolito/python-docx.git@66fa597
This last one is a merge into the current master branch as per the latest version available (including solved conflicts)

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

4 participants
@al-rahul@SebG-js@schwaxpl@TommasoPetrolito

[8]ページ先頭

©2009-2025 Movatter.jp