-
Notifications
You must be signed in to change notification settings - Fork 89
Description
Hi there,
I have difficulty getting a proper XML model out of opcua-modeler as the ua-modelcompiler by sailavid (docker pull sailavid/ua-modelcompiler) keeps telling me, that There is an error in XML document (2, 2).
So I decided to look into the code and imported opcua-modeler into PyCharm Pro. I resolved all dependencies, and it is starting, but I get the following error when trying to open a new model:
uawidgets.utils - ERROR - 'SyncNode' object has no attribute 'get_attributes'')
Traceback (most recent call last):
File "/Users/martinmajewski/Development/Python/opcua-modeler/venv/lib/python3.9/site-packages/uawidgets/utils.py", line 21, in wrapper
result = func(self, *args)
File "/Users/martinmajewski/Development/Python/opcua-modeler/uamodeler/uamodeler.py", line 204, in new
self._model_mgr.new_model()
File "/Users/martinmajewski/Development/Python/opcua-modeler/uamodeler/model_manager.py", line 90, in new_model
self.modeler.tree_ui.set_root_node(self.server_mgr.nodes.root)
File "/Users/martinmajewski/Development/Python/opcua-modeler/venv/lib/python3.9/site-packages/uawidgets/tree_widget.py", line 43, in set_root_node
self.model.set_root_node(node)
File "/Users/martinmajewski/Development/Python/opcua-modeler/venv/lib/python3.9/site-packages/uawidgets/tree_widget.py", line 167, in set_root_node
desc = self._get_node_desc(node)
File "/Users/martinmajewski/Development/Python/opcua-modeler/venv/lib/python3.9/site-packages/uawidgets/tree_widget.py", line 171, in _get_node_desc
attrs = node.get_attributes([ua.AttributeIds.DisplayName, ua.AttributeIds.BrowseName, ua.AttributeIds.NodeId, ua.AttributeIds.NodeClass])
AttributeError: 'SyncNode' object has no attribute 'get_attributes'
I could not find anything meaningful on the web regarding this exact error message, but I noticed that on startup, I get the following error once:
QObject::connect: Cannot queue arguments of type 'QTextCursor'
(Make sure 'QTextCursor' is registered using qRegisterMetaType().)
Maybe my issue somehow propagates from this issue?
I searched the web and found one hint of what's possibly wrong:
https://stackoverflow.com/questions/2104779/qobject-qplaintextedit-multithreading-issues
However, this seems like an issue for some Python-Pros and nothing I can resolve on my own with the little time I have at hand.
However, I would like to know the other issue with the ua-model compiler and why it is complaining about the XML file.
Shall I open another issue for this, or is this something known that can be answered in a few sentences?
Best wishes,
Martin