Pypcc immediately crashes
Somehow executing opcuaserv.AddVarR("pypcc_git_hash", git_hash, [], False)
(https://git.astron.nl/lofar2.0/pypcc/-/blob/master/pypcc/pypcc.py#L71) goes terribly wrong but only if pypcc is run with --config UNB2TR
WARNING:asyncua.server.server:Endpoints other than open requested but private key and certificate are not set.
Traceback (most recent call last):
File "/usr/local/bin/hwtr", line 11, in <module>
load_entry_point('pypcc==0.1.0', 'console_scripts', 'hwtr')()
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 490, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2854, in load_entry_point
return ep.load()
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2445, in load
return self.resolve()
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2451, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 655, in _load_unlocked
File "<frozen importlib._bootstrap>", line 618, in _load_backward_compatible
File "<frozen zipimport>", line 259, in load_module
File "/usr/local/lib/python3.8/dist-packages/pypcc-0.1.0-py3.8.egg/pypcc/pypcc.py", line 74, in <module>
File "/usr/local/lib/python3.8/dist-packages/pypcc-0.1.0-py3.8.egg/pypcc/opcuaserv/yamlreader.py", line 129, in __init__
File "/usr/local/lib/python3.8/dist-packages/pypcc-0.1.0-py3.8.egg/pypcc/yamlconfig.py", line 38, in __init__
File "/usr/local/lib/python3.8/dist-packages/pypcc-0.1.0-py3.8.egg/pypcc/yamlconfig.py", line 74, in expand_variables
File "/usr/local/lib/python3.8/dist-packages/pypcc-0.1.0-py3.8.egg/pypcc/yamlconfig.py", line 20, in GetField
IndexError: list index out of range
Since this works as intended without the configuration and I have verified that the git_hash
variable is properly populated in all cases it really does suggest there is a fundamental issue with how AddVarR
traverses lists and adds data.
Edited by Corné Lukken