Topic: Error running qet_tb_generator on last 0.8-dev

Hi Unalcalde,

'folioSheetQuantity' value was removed recently in project XML, and break qet_tb_generator:
https://git.tuxfamily.org/qet/qet.git/c … 196277a5d5


Traceback (most recent call last):
  File "/usr/bin/qet_tb_generator", line 11, in <module>
    load_entry_point('qet-tb-generator==1.1.5', 'console_scripts', 'qet_tb_generator')()
  File "/usr/lib/python3/dist-packages/src/main.py", line 840, in main
    qet_project = QETProject(qet_file)  # allows working with a QET XML file.
  File "/usr/lib/python3/dist-packages/src/qetproject.py", line 80, in __init__
    self.pageOffset = int (self.qet_project.attrib
KeyError: 'folioSheetQuantity'
Traceback (most recent call last):
  File "qet_tb_generator.py", line 9, in <module>
  File "src/main.py", line 840, in main
  File "src/qetproject.py", line 80, in __init__
KeyError: 'folioSheetQuantity'
[5263] Failed to execute script qet_tb_generator

Workaround add folioSheetQuantity="0" like this:
<project title="Example project" folioSheetQuantity="0" version="0.80">
before opening project to launch with qet_tb_generator.


https://github.com/qelectrotech/qet_tb_ … ect.py#L79

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

Re: Error running qet_tb_generator on last 0.8-dev

Ok, will fix it 2 weeks.

Re: Error running qet_tb_generator on last 0.8-dev

Nice, thanks.

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

Re: Error running qet_tb_generator on last 0.8-dev

The new version 1.1.6 solves the problem: https://qelectrotech.org/forum/viewtopi … 995#p12995

Re: Error running qet_tb_generator on last 0.8-dev

Bonsoir,

Using the 1.1.7 and QET 0.80 on Ubuntu 20.04, I can't lauch the generator.
It seems Qelectrotech don't write the following words in the header.

xmlns:ns0="http://www.w3.org/2000/svg"

Adding this make it runnable.

Is there any configuration file that I may have missed ?

Par avance, merci,
Guillaume Thierry

Re: Error running qet_tb_generator on last 0.8-dev

Bonsoir,
le problème vient surement des logos
https://qelectrotech.org/forum/viewtopi … 103#p12103

Laurent

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

Re: Error running qet_tb_generator on last 0.8-dev

Good evening,
on Ubuntu 20.04 I get "IndexError: list index out of range" running the QElectrotech terminal block plug-in - v1.1.7;
I remove as suggested all the infos about logos, but no way.
Could you please help me?
I attached the Qet file.
Thank for your attention and a big "Bravo!" to the developers!
All the best
Andrea

Post's attachments

Attachment icon QuadriVinificatoriPLC_001_test.qet 923.36 kb, 250 downloads since 2020-12-28 

Re: Error running qet_tb_generator on last 0.8-dev

Hi,

same error here :

qelectrotech
18:41:46 INFO     ** QElectrotech terminal block plug-in - v1.1.7 ** [main.main:845]
18:41:46 INFO     Using the argument passed: ['/usr/local/bin/qet_tb_generator', '/media/backup6/download/QuadriVinificatoriPLC_001_test.qet'](2) [main.get_QET_path:775]
18:41:46 INFO     Atribute 'folioSheetQuantity' doesn't exist. Assuming 0 [qetproject.__init__:86]
18:41:46 DEBUG    Getting cable number connected to terminal 29 at page ARRIVO / DISTRIBUZIONE LINEA E ALIMENTAZIONE AUSILIARI [qetproject._getCableNum:217]
18:41:46 DEBUG    Getting cable number connected to terminal 30 at page ARRIVO / DISTRIBUZIONE LINEA E ALIMENTAZIONE AUSILIARI [qetproject._getCableNum:217]
18:41:46 DEBUG    Cols: 17      Col size: 60    Row size: 80    X position: 410 Y Position: 90 [qetproject._getXRefByCoord:302]
18:41:46 DEBUG    Getting cable number connected to terminal 31 at page ARRIVO / DISTRIBUZIONE LINEA E ALIMENTAZIONE AUSILIARI [qetproject._getCableNum:217]
18:41:46 DEBUG    Getting cable number connected to terminal 32 at page ARRIVO / DISTRIBUZIONE LINEA E ALIMENTAZIONE AUSILIARI [qetproject._getCableNum:217]
18:41:46 DEBUG    Cols: 17      Col size: 60    Row size: 80    X position: 410 Y Position: 70 [qetproject._getXRefByCoord:302]
18:41:46 DEBUG    Getting cable number connected to terminal 54 at page ARRIVO / DISTRIBUZIONE LINEA E ALIMENTAZIONE AUSILIARI [qetproject._getCableNum:217]
18:41:46 DEBUG    Getting cable number connected to terminal 55 at page ARRIVO / DISTRIBUZIONE LINEA E ALIMENTAZIONE AUSILIARI [qetproject._getCableNum:217]
18:41:46 DEBUG    Cols: 17      Col size: 60    Row size: 80    X position: 410 Y Position: 130 [qetproject._getXRefByCoord:302]
18:41:46 DEBUG    Getting cable number connected to terminal 64 at page ARRIVO / DISTRIBUZIONE LINEA E ALIMENTAZIONE AUSILIARI [qetproject._getCableNum:217]
18:41:46 DEBUG    Getting cable number connected to terminal 65 at page ARRIVO / DISTRIBUZIONE LINEA E ALIMENTAZIONE AUSILIARI [qetproject._getCableNum:217]
18:41:46 DEBUG    Cols: 17      Col size: 60    Row size: 80    X position: 410 Y Position: 110 [qetproject._getXRefByCoord:302]
18:41:46 DEBUG    Getting cable number connected to terminal 14 at page INVERTER MOTORE PALA ESTRAZIONE VINACCE [qetproject._getCableNum:217]
18:41:46 DEBUG    Getting cable number connected to terminal 15 at page INVERTER MOTORE PALA ESTRAZIONE VINACCE [qetproject._getCableNum:217]
18:41:46 DEBUG    Cols: 17      Col size: 60    Row size: 80    X position: 200 Y Position: 510 [qetproject._getXRefByCoord:302]
18:41:46 DEBUG    Getting cable number connected to terminal 62 at page INVERTER MOTORE PALA ESTRAZIONE VINACCE [qetproject._getCableNum:217]
18:41:46 DEBUG    Getting cable number connected to terminal 63 at page INVERTER MOTORE PALA ESTRAZIONE VINACCE [qetproject._getCableNum:217]
18:41:46 DEBUG    Cols: 17      Col size: 60    Row size: 80    X position: 290 Y Position: 510 [qetproject._getXRefByCoord:302]
18:41:46 DEBUG    Getting cable number connected to terminal 66 at page INVERTER MOTORE PALA ESTRAZIONE VINACCE [qetproject._getCableNum:217]
18:41:46 DEBUG    Getting cable number connected to terminal 67 at page INVERTER MOTORE PALA ESTRAZIONE VINACCE [qetproject._getCableNum:217]
18:41:46 DEBUG    Cols: 17      Col size: 60    Row size: 80    X position: 230 Y Position: 510 [qetproject._getXRefByCoord:302]
18:41:46 DEBUG    Getting cable number connected to terminal 82 at page INVERTER MOTORE PALA ESTRAZIONE VINACCE [qetproject._getCableNum:217]
18:41:46 DEBUG    Getting cable number connected to terminal 83 at page INVERTER MOTORE PALA ESTRAZIONE VINACCE [qetproject._getCableNum:217]
18:41:46 DEBUG    Cols: 17      Col size: 60    Row size: 80    X position: 260 Y Position: 510 [qetproject._getXRefByCoord:302]
18:41:46 DEBUG    Getting cable number connected to terminal 2 at page INVERTER MOTORE POMPA TC.DV [qetproject._getCableNum:217]
18:41:46 DEBUG    Getting cable number connected to terminal 3 at page INVERTER MOTORE POMPA TC.DV [qetproject._getCableNum:217]
18:41:46 DEBUG    Cols: 17      Col size: 60    Row size: 80    X position: 200 Y Position: 510 [qetproject._getXRefByCoord:302]
18:41:46 DEBUG    Getting cable number connected to terminal 57 at page INVERTER MOTORE POMPA TC.DV [qetproject._getCableNum:217]
18:41:46 DEBUG    Getting cable number connected to terminal 58 at page INVERTER MOTORE POMPA TC.DV [qetproject._getCableNum:217]
18:41:46 DEBUG    Cols: 17      Col size: 60    Row size: 80    X position: 230 Y Position: 510 [qetproject._getXRefByCoord:302]
18:41:46 DEBUG    Getting cable number connected to terminal 64 at page INVERTER MOTORE POMPA TC.DV [qetproject._getCableNum:217]
18:41:46 DEBUG    Getting cable number connected to terminal 65 at page INVERTER MOTORE POMPA TC.DV [qetproject._getCableNum:217]
18:41:46 DEBUG    Cols: 17      Col size: 60    Row size: 80    X position: 290 Y Position: 510 [qetproject._getXRefByCoord:302]
18:41:46 DEBUG    Getting cable number connected to terminal 18 at page MODULO DI SICUREZZA [qetproject._getCableNum:217]
18:41:46 DEBUG    Getting cable number connected to terminal 19 at page MODULO DI SICUREZZA [qetproject._getCableNum:217]
18:41:46 DEBUG    Cols: 17      Col size: 60    Row size: 80    X position: 230 Y Position: 150 [qetproject._getXRefByCoord:302]
18:41:46 DEBUG    Getting cable number connected to terminal 26 at page MODULO DI SICUREZZA [qetproject._getCableNum:217]
18:41:46 DEBUG    Getting cable number connected to terminal 27 at page MODULO DI SICUREZZA [qetproject._getCableNum:217]
18:41:46 DEBUG    Cols: 17      Col size: 60    Row size: 80    X position: 230 Y Position: 90 [qetproject._getXRefByCoord:302]
18:41:46 DEBUG    Getting cable number connected to terminal 0 at page AUSILIARI 24VDC [qetproject._getCableNum:217]
18:41:46 DEBUG    Getting cable number connected to terminal 1 at page AUSILIARI 24VDC [qetproject._getCableNum:217]
18:41:46 DEBUG    Cols: 17      Col size: 60    Row size: 80    X position: 530 Y Position: 450 [qetproject._getXRefByCoord:302]
18:41:46 DEBUG    Getting cable number connected to terminal 9 at page AUSILIARI 24VDC [qetproject._getCableNum:217]
18:41:46 DEBUG    Getting cable number connected to terminal 10 at page AUSILIARI 24VDC [qetproject._getCableNum:217]
18:41:46 DEBUG    Cols: 17      Col size: 60    Row size: 80    X position: 890 Y Position: 310 [qetproject._getXRefByCoord:302]
18:41:46 DEBUG    Getting cable number connected to terminal 18 at page AUSILIARI 24VDC [qetproject._getCableNum:217]
18:41:46 DEBUG    Getting cable number connected to terminal 19 at page AUSILIARI 24VDC [qetproject._getCableNum:217]
18:41:46 DEBUG    Cols: 17      Col size: 60    Row size: 80    X position: 890 Y Position: 450 [qetproject._getXRefByCoord:302]
18:41:46 DEBUG    Getting cable number connected to terminal 27 at page AUSILIARI 24VDC [qetproject._getCableNum:217]
18:41:46 DEBUG    Getting cable number connected to terminal 28 at page AUSILIARI 24VDC [qetproject._getCableNum:217]
18:41:46 DEBUG    Cols: 17      Col size: 60    Row size: 80    X position: 710 Y Position: 450 [qetproject._getXRefByCoord:302]
18:41:46 DEBUG    Getting cable number connected to terminal 31 at page AUSILIARI 24VDC [qetproject._getCableNum:217]
18:41:46 DEBUG    Getting cable number connected to terminal 32 at page AUSILIARI 24VDC [qetproject._getCableNum:217]
18:41:46 DEBUG    Cols: 17      Col size: 60    Row size: 80    X position: 710 Y Position: 310 [qetproject._getXRefByCoord:302]
18:41:46 DEBUG    Getting cable number connected to terminal 37 at page AUSILIARI 24VDC [qetproject._getCableNum:217]
18:41:46 DEBUG    Getting cable number connected to terminal 38 at page AUSILIARI 24VDC [qetproject._getCableNum:217]
18:41:46 DEBUG    Cols: 17      Col size: 60    Row size: 80    X position: 410 Y Position: 450 [qetproject._getXRefByCoord:302]
18:41:46 DEBUG    Getting cable number connected to terminal 39 at page AUSILIARI 24VDC [qetproject._getCableNum:217]
18:41:46 DEBUG    Getting cable number connected to terminal 40 at page AUSILIARI 24VDC [qetproject._getCableNum:217]
18:41:46 DEBUG    Cols: 17      Col size: 60    Row size: 80    X position: 410 Y Position: 310 [qetproject._getXRefByCoord:302]
18:41:46 DEBUG    Getting cable number connected to terminal 41 at page AUSILIARI 24VDC [qetproject._getCableNum:217]
18:41:46 DEBUG    Getting cable number connected to terminal 42 at page AUSILIARI 24VDC [qetproject._getCableNum:217]
18:41:46 DEBUG    Cols: 17      Col size: 60    Row size: 80    X position: 530 Y Position: 310 [qetproject._getXRefByCoord:302]
18:41:46 DEBUG    Getting cable number connected to terminal 43 at page AUSILIARI 24VDC [qetproject._getCableNum:217]
18:41:46 DEBUG    Getting cable number connected to terminal 44 at page AUSILIARI 24VDC [qetproject._getCableNum:217]
18:41:46 DEBUG    Cols: 17      Col size: 60    Row size: 80    X position: 290 Y Position: 310 [qetproject._getXRefByCoord:302]
18:41:46 DEBUG    Getting cable number connected to terminal 52 at page AUSILIARI 24VDC [qetproject._getCableNum:217]
18:41:46 DEBUG    Getting cable number connected to terminal 53 at page AUSILIARI 24VDC [qetproject._getCableNum:217]
18:41:46 DEBUG    Cols: 17      Col size: 60    Row size: 80    X position: 290 Y Position: 450 [qetproject._getXRefByCoord:302]
18:41:46 DEBUG    Getting cable number connected to terminal 0 at page PLC / HMI ALIMENTAZIONI, COMUNICAZIONE E INPUT ANALOGICI [qetproject._getCableNum:217]
18:41:46 DEBUG    Getting cable number connected to terminal 1 at page PLC / HMI ALIMENTAZIONI, COMUNICAZIONE E INPUT ANALOGICI [qetproject._getCableNum:217]
18:41:46 DEBUG    Cols: 17      Col size: 60    Row size: 80    X position: 681 Y Position: 90 [qetproject._getXRefByCoord:302]
18:41:46 DEBUG    Getting cable number connected to terminal 2 at page PLC / HMI ALIMENTAZIONI, COMUNICAZIONE E INPUT ANALOGICI [qetproject._getCableNum:217]
18:41:46 DEBUG    Getting cable number connected to terminal 3 at page PLC / HMI ALIMENTAZIONI, COMUNICAZIONE E INPUT ANALOGICI [qetproject._getCableNum:217]
18:41:46 DEBUG    Cols: 17      Col size: 60    Row size: 80    X position: 511 Y Position: 90 [qetproject._getXRefByCoord:302]
18:41:46 DEBUG    Getting cable number connected to terminal 7 at page PLC / HMI ALIMENTAZIONI, COMUNICAZIONE E INPUT ANALOGICI [qetproject._getCableNum:217]
18:41:46 DEBUG    Getting cable number connected to terminal 8 at page PLC / HMI ALIMENTAZIONI, COMUNICAZIONE E INPUT ANALOGICI [qetproject._getCableNum:217]
18:41:46 DEBUG    Cols: 17      Col size: 60    Row size: 80    X position: 681 Y Position: 160 [qetproject._getXRefByCoord:302]
18:41:46 DEBUG    Getting cable number connected to terminal 11 at page PLC / HMI ALIMENTAZIONI, COMUNICAZIONE E INPUT ANALOGICI [qetproject._getCableNum:217]
18:41:46 DEBUG    Getting cable number connected to terminal 12 at page PLC / HMI ALIMENTAZIONI, COMUNICAZIONE E INPUT ANALOGICI [qetproject._getCableNum:217]
18:41:46 DEBUG    Cols: 17      Col size: 60    Row size: 80    X position: 511 Y Position: 160 [qetproject._getXRefByCoord:302]
18:41:46 DEBUG    Getting cable number connected to terminal 16 at page PLC / HMI ALIMENTAZIONI, COMUNICAZIONE E INPUT ANALOGICI [qetproject._getCableNum:217]
18:41:46 DEBUG    Getting cable number connected to terminal 17 at page PLC / HMI ALIMENTAZIONI, COMUNICAZIONE E INPUT ANALOGICI [qetproject._getCableNum:217]
18:41:46 DEBUG    Cols: 17      Col size: 60    Row size: 80    X position: 720 Y Position: 120 [qetproject._getXRefByCoord:302]
18:41:46 DEBUG    Getting cable number connected to terminal 29 at page PLC / HMI ALIMENTAZIONI, COMUNICAZIONE E INPUT ANALOGICI [qetproject._getCableNum:217]
18:41:46 DEBUG    Getting cable number connected to terminal 30 at page PLC / HMI ALIMENTAZIONI, COMUNICAZIONE E INPUT ANALOGICI [qetproject._getCableNum:217]
18:41:46 DEBUG    Cols: 17      Col size: 60    Row size: 80    X position: 550 Y Position: 120 [qetproject._getXRefByCoord:302]
18:41:46 DEBUG    Getting cable number connected to terminal 31 at page PLC / HMI ALIMENTAZIONI, COMUNICAZIONE E INPUT ANALOGICI [qetproject._getCableNum:217]
18:41:46 DEBUG    Getting cable number connected to terminal 32 at page PLC / HMI ALIMENTAZIONI, COMUNICAZIONE E INPUT ANALOGICI [qetproject._getCableNum:217]
18:41:46 DEBUG    Cols: 17      Col size: 60    Row size: 80    X position: 550 Y Position: 120 [qetproject._getXRefByCoord:302]
18:41:46 DEBUG    Getting cable number connected to terminal 33 at page PLC / HMI ALIMENTAZIONI, COMUNICAZIONE E INPUT ANALOGICI [qetproject._getCableNum:217]
18:41:46 DEBUG    Getting cable number connected to terminal 34 at page PLC / HMI ALIMENTAZIONI, COMUNICAZIONE E INPUT ANALOGICI [qetproject._getCableNum:217]
18:41:46 DEBUG    Cols: 17      Col size: 60    Row size: 80    X position: 720 Y Position: 120 [qetproject._getXRefByCoord:302]
18:41:46 DEBUG    Getting cable number connected to terminal 3 at page PLC / HMI INPUT DIGITALI [qetproject._getCableNum:217]
Traceback (most recent call last):
  File "/usr/local/bin/qet_tb_generator", line 8, in <module>
    sys.exit(main())
  File "/usr/lib/python3/dist-packages/src/main.py", line 857, in main
    qet_terminals = qet_project.get_list_of_used_terminals()
  File "/usr/lib/python3/dist-packages/src/qetproject.py", line 331, in get_list_of_used_terminals
    terminalId2 = terminals[1].attrib['
id']
IndexError: list index out of range

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

Re: Error running qet_tb_generator on last 0.8-dev

@atabanelli: seems run if you remove X1:24 etc in PLC / HMI INPUT DIGITALI folio, like this :
https://download.qelectrotech.org/qet/forum_img_2/bug_qet_tb_generator.png

Post's attachments

Attachment icon QuadriVinificatoriPLC_001_test.zip 80.63 kb, 223 downloads since 2020-12-28 

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

Re: Error running qet_tb_generator on last 0.8-dev

@scorpio810:
Thank you very much for your help!
I will modify the scheme in order not to have "hanging" terminals!
All the best
Andrea

Re: Error running qet_tb_generator on last 0.8-dev

@Andrea :
In your diagrams, you use many many terminals to connect wires between them, it is not useful and this is what blocks the terminal generator with too many unnecessary terminals, plus the terminals X1: 35 X1: 36 and X1: 33 X1: 34 are assigned to the same terminals..

https://download.qelectrotech.org/qet/forum_img_2/bug_qet_tb_generator2.png

Regards,
Laurent

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

12 (edited by atabanelli 2020-12-31 16:14:11)

Re: Error running qet_tb_generator on last 0.8-dev

@scorpio810 / Laurent:
Thank you very much for your hints,
I correct all the terminals misuse, as in the attached project,
now terminal block generator runs smooth.
I create three modules for Unitronics PLCs, I'd like to share them with the comunity.
Have a great 2021!

PS: there are some glitches for the italian translation in the component's list, if I can help some way...

Andrea

Post's attachments

Attachment icon QuadriVinificatoriPLC_001.qet 1.35 mb, 268 downloads since 2020-12-31 

Re: Error running qet_tb_generator on last 0.8-dev

@Andrea,

happy to help you.
For modules you can share them here.
For italian translation you can help with a Github pull request, see here :
https://qelectrotech.org/forum/viewtopi … 739#p13739

Have a great 2021!

Laurent

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