300 Python-Fehler und Debug » Historie » Version 2
[X] Daniel S, 27.08.2018 10:52
| 1 | 1 | [X] Daniel S | h1. Python-Fehler und Debug |
|---|---|---|---|
| 2 | 2 | [X] Daniel S | |
| 3 | * Im Formdesigner das Debugging für Python aktivieren |
||
| 4 | * Die entstehende Python-Datei auf dem Desktop speichern |
||
| 5 | |||
| 6 | * Mit Editor die Python-Datei öffnen |
||
| 7 | * Auf der Konsole die Python Datei ausführen |
||
| 8 | |||
| 9 | > im folgenden Bsp habe ich die fehlerhafte Datei in Notepad bearbeitet und anschliessend wieder gestestet, mit positiviem Ergebnis > ich habe das Script wieder in PRODAT übertragen. |
||
| 10 | |||
| 11 | <pre> |
||
| 12 | D:\>ProdatERP\CNC\Prodat\python\python.exe C:\Users\ProdatAdmin\Desktop\27.py |
||
| 13 | Traceback (most recent call last): |
||
| 14 | File "C:\Users\ProdatAdmin\Desktop\27.py", line 31, in <module> |
||
| 15 | Sql.sql_add(Sql.add_and('mpl_formonth', edyear+combomonth)) |
||
| 16 | TypeError: cannot concatenate 'str' and 'int' objects |
||
| 17 | |||
| 18 | D:\>ProdatERP\CNC\Prodat\python\python.exe C:\Users\ProdatAdmin\Desktop\27.py |
||
| 19 | |||
| 20 | WHERE |
||
| 21 | (mpl_minr) LIKE ('60') |
||
| 22 | AND |
||
| 23 | (mpl_formonth) LIKE ('201800') |
||
| 24 | ORDER BY mpl_minr, mpl_date, bd_anf |
||
| 25 | |||
| 26 | D:\> |
||
| 27 | </pre> |