导入opcua xml文件

huangapple go评论139阅读模式
英文:

Importing opcua xml files

问题

在导入OPC UA设备、OPCUA机械和OPCUA泵时,出现了以下错误:解析类型'QualifiedName'的值尚未实现。

这是我正在使用的代码:

from opcua import ua, Server
# 创建服务器
server = Server()
# 设置服务器端点
url = "opc.tcp://10.220.1.163:4140"
server.set_endpoint(url)
# 设置服务器名称
server.set_server_name("OPC UA服务器")
server.import_xml("Opc.Ua.Di.NodeSet2.xml")
server.import_xml("Opc.Ua.Machinery.Nodeset2.xml")
server.import_xml("Opc.Ua.Pumps.NodeSet2.xml")
server.import_xml("NetschPump.xml")
server.start()

有人可以告诉我这个错误是什么吗?我已经尝试了2天,但没有找到任何线索。您的建议和解决方案将不胜感激。

我尝试过将所有文件一起导入,但总是导致错误。

英文:

when i am importing OPC UA devices, OPCUA machinery , and OPCUA pump , gertting this error : Parsing value of type 'QualifiedName' not implemented

here is the code i am using :
from opcua import ua, Server
# Create server
server = Server()
# Set server endpoint
url = "opc.tcp://10.220.1.163:4140"
server.set_endpoint(url)
# Set server name
server.set_server_name("OPC UA Server")
server.import_xml("Opc.Ua.Di.NodeSet2.xml")
server.import_xml("Opc.Ua.Machinery.Nodeset2.xml")
server.import_xml("Opc.Ua.Pumps.NodeSet2.xml")
server.import_xml("NetschPump.xml")
server.start()

can somebody tell me what is the error ? i have been trying to solve since 2 days, but did not find any clue. your advices and solution would be appreciated.

I have tried to importing all files together, but it causes an error always.

答案1

得分: 1

切换到asyncua。asyncua库正在积极维护,并且已经进行了许多有关XML导入的修复。如果错误也存在于asyncua中,请在那里打开一个带有最小示例的问题,我会查看这个问题。

英文:

Switch to asyncua. The asyncua library is active mantained and has a lot of fixes reagarding xml import. If the error is also in asyncua, open a issue there with minimal example and I will have a look a the problem.

huangapple
  • 本文由 发表于 2023年6月5日 18:38:52
  • 转载请务必保留本文链接:https://go.coder-hub.com/76405612.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定