Topic: one way terminal error
Hi,
I get following error with an empty project only with the one one-way terminal (borne_finale.elmt):
qet_tb_generator Test1.qet
Traceback (most recent call last):
File "C:\Python3\Scripts\qet_tb_generator-script.py", line 11, in <module>
load_entry_point('qet-tb-generator==1.1.5', 'console_scripts', 'qet_tb_generator')()
File "c:\python3\lib\site-packages\src\main.py", line 841, in main
qet_terminals = qet_project.get_list_of_used_terminals()
File "c:\python3\lib\site-packages\src\qetproject.py", line 321, in get_list_of_used_terminals
cableNum = self._getCableNum(diagram, terminalId)
File "c:\python3\lib\site-packages\src\qetproject.py", line 209, in _getCableNum
for cable in diagram.find('conductors').findall('conductor'):
AttributeError: 'NoneType' object has no attribute 'findall'
The problem is that in the project is not <conductors> section, i.e. no conductors yet.
---
Another type of error when I use two connected one-way terminals (borne_finale.elmt):
qet_tb_generator Test2.qet
Traceback (most recent call last):
File "C:\Python3\Scripts\qet_tb_generator-script.py", line 11, in <module>
load_entry_point('qet-tb-generator==1.1.5', 'console_scripts', 'qet_tb_generator')()
File "c:\python3\lib\site-packages\src\main.py", line 841, in main
qet_terminals = qet_project.get_list_of_used_terminals()
File "c:\python3\lib\site-packages\src\qetproject.py", line 326, in get_list_of_used_terminals
terminalId2 = terminals[1].attrib['id']
IndexError: list index out of range
The problem is that in the section <conductors> is only one <conductor>, i.e. one conductor.