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.

Re: one way terminal error

I have Terminal block generator v1.1.5

Re: one way terminal error

Send your project.

Re: one way terminal error

galexis wrote:

Send your project.

Here it is.

Post's attachments

Attachment icon OneWayTerminal_projects.zip 6.03 kb, 250 downloads since 2020-04-27 

Re: one way terminal error

your example project is too small to try qet_tb_generator ...

"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."