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

xmlimporter.add_object(): Exclusion of HasEncoding target objects sometimes fails for 'Default JSON' #1522

Open
DrMatthiasArnold opened this issue Dec 11, 2023 · 0 comments

Comments

@DrMatthiasArnold
Copy link

DrMatthiasArnold commented Dec 11, 2023

Describe the bug

When loading node sets with user specific data types, the supported encoding rules are provided via HasEncoding references which point to an object with display names "Default Binary", "Default XML", "Default JSON".
(for further information OPC 10000-6: UA Part 6: Mappings)
Since these referenced objects typically don't have parent objects within the namespace, the xmlimporter.add_object() method excludes such objects from further checks.
However, due to a misspelling "Default Json" instead of "Default JSON" this exclusion does not work as expected and loading node sets could fail with an error.

Corrected version of code (lines xmlimporter.py 358 - 360):

# do not verify these nodes because some nodesets contain invalid elements
if obj.displayname != 'Default Binary' and obj.displayname != 'Default XML' and obj.displayname != 'Default JSON':
    res[0].StatusCode.check()

To Reproduce

Specific node set still to be published.

Version

Python-Version:

opcua-asyncio Version (master branch & update):

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant