View Issue Details

IDProjectCategoryView StatusLast Update
000645730120: IO-LinkImplementation Bugpublic2021-02-05 11:25
ReporterIoan Orghici Assigned ToJoachim Stilz 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionno change required 
Summary0006457: Unnecessary empty LocalizedText tags break my compilation
Description

In the current Opc.Ua.IOLink.NodeSet2.xml there are a lot of
<LocalizedText>
<Locale>en</Locale>
</LocalizedText>
tags repeated around the code that break my compilation as the text field is empty.

Only tried it with the open62541 nodeset generation tool, but it seem to me that these tags are unnecessary.

There are 100 or so of these tags often consecutive in the same ListOfLocalizedText tag.

Steps To Reproduce

python open62541/tools/nodeset_compiler/nodeset_compiler.py --types-array=UA_TYPES -e open62541/deps/ua-nodeset/Schema/Opc.Ua.NodeSet2.xml -e open62541/deps/ua-nodeset/DI/Opc.Ua.Di.NodeSet2.xml -x ~open62541/deps/ua-nodeset/IOLink/Opc.Ua.IOLink.NodeSet2.xml test

INFO:main:Preprocessing (existing) ../open62541/deps/ua-nodeset/Schema/Opc.Ua.NodeSet2.xml
INFO:main:Preprocessing (existing) /home/ioan/bdn/open62541/deps/ua-nodeset/DI/Opc.Ua.Di.NodeSet2.xml
INFO:main:Preprocessing /home/ioan/bdn/open62541/deps/ua-nodeset/IOLink/Opc.Ua.IOLink.NodeSet2.xml
INFO:main:Generating Code for Backend: open62541
Traceback (most recent call last):
File "/home/ioan/bdn/open62541/tools/nodeset_compiler/nodeset_compiler.py", line 189, in <module>
generateOpen62541Code(ns, args.outputFile, args.internal_headers, args.typesArray)
File "/home/ioan/bdn/open62541/tools/nodeset_compiler/backend_open62541.py", line 230, in generateOpen62541Code
code = generateNodeCode_begin(node, nodeset, code_global)
File "/home/ioan/bdn/open62541/tools/nodeset_compiler/backend_open62541_nodes.py", line 493, in generateNodeCode_begin
[code1, codeCleanup1, codeGlobal1] = generateVariableNodeCode(node, nodeset)
File "/home/ioan/bdn/open62541/tools/nodeset_compiler/backend_open62541_nodes.py", line 231, in generateVariableNodeCode
[code1, codeCleanup1, codeGlobal1] = generateCommonVariableCode(node, nodeset)
File "/home/ioan/bdn/open62541/tools/nodeset_compiler/backend_open62541_nodes.py", line 195, in generateCommonVariableCode
[code1, codeCleanup1, codeGlobal1] = generateValueCode(node.value, nodeset.nodes[node.id], nodeset)
File "/home/ioan/bdn/open62541/tools/nodeset_compiler/backend_open62541_nodes.py", line 406, in generateValueCode
valueName + "[" + str(idx) + "]" , v, instanceName, valueName, codeGlobal))
File "/home/ioan/bdn/open62541/tools/nodeset_compiler/backend_open62541_datatypes.py", line 121, in generateNodeValueCode
return prepend + " = " + generateLocalizedTextCode(node, alloc=asIndirect) + ";"
File "/home/ioan/bdn/open62541/tools/nodeset_compiler/backend_open62541_datatypes.py", line 72, in generateLocalizedTextCode
vt = makeCLiteral(value.text)
File "/home/ioan/bdn/open62541/tools/nodeset_compiler/backend_open62541_datatypes.py", line 24, in makeCLiteral
return re.sub(r'(?<!\)"', r'\"', value.replace('\', r'\').replace('"', r'\"').replace('\n', r'\n').replace('\r', r''))
AttributeError: 'NoneType' object has no attribute 'replace'

TagsNo tags attached.

Activities

Ioan Orghici

2021-02-03 09:34

reporter   ~0013666

Not a bug. I wasn't able to change or delete it.
After further investigations I found the problem to be with the nodeset compiler from the library. The compiler should add an empty string when the text tag doesn't exit.

Joachim Stilz

2021-02-05 11:25

viewer   ~0013679

Reporter said, that this is not a bug. So I close it without any further action.

Issue History

Date Modified Username Field Change
2021-02-02 18:14 Ioan Orghici New Issue
2021-02-03 09:34 Ioan Orghici Note Added: 0013666
2021-02-05 11:21 Joachim Stilz Assigned To => Joachim Stilz
2021-02-05 11:21 Joachim Stilz Status new => assigned
2021-02-05 11:25 Joachim Stilz Status assigned => resolved
2021-02-05 11:25 Joachim Stilz Resolution open => no change required
2021-02-05 11:25 Joachim Stilz Note Added: 0013679