Skip to content
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

Fixed type error xml import of empty elements #199

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Conversation

drfho
Copy link
Contributor

@drfho drfho commented Oct 11, 2023

An XML import into a non-schema-identical target client may result in a type error due to function xmllib.xmlOnUnknownEndTag(): in these cases value may occurs as empty list instead of dict.
This should be covered:

xml_import

@drfho drfho requested a review from zmsdev October 11, 2023 19:08
@zmsdev
Copy link
Contributor

zmsdev commented Oct 23, 2023

Can you also provide a sample xml.
We could write a unit-test for the error.

Copy link
Contributor

@zmsdev zmsdev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left some comments

@drfho
Copy link
Contributor Author

drfho commented Oct 23, 2023

@zmsdev
Thanks for reply. I am sorry, cannot reprduce it. The once observed case revealed a type problem ([] vs {}) for unknown reasons. Because of model mismatch, the import does not work anyway. So its good enough, not to block further import. Variable lang does not seem to be relevant for causing the error.

@zmsdev zmsdev added the bug Something isn't working label Oct 26, 2023
@zms-publishing zms-publishing deleted a comment from zmsdev Apr 17, 2024
@drfho
Copy link
Contributor Author

drfho commented Apr 17, 2024

@zmsdev : now the lang var is added to error info and the code covers another type error None.pop() in case of incomplete content models . Looking forward to your comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants