How to prevent exceptions to be printed twice ? #330
-
Hi, When an exception occurs, its message is displayed on stdout (probably directly from the snap7 library?) and then the exception is thrown in Python which result in the message being displayed this like so : Is there a way to prevent the first message ( |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
Could you provide the minimal pythoncode you have used? In general, if stuff is send to stdout inside of snap7, we can't handle it. |
Beta Was this translation helpful? Give feedback.
-
The line starts with |
Beta Was this translation helpful? Give feedback.
-
couldn't find a print, so my guess is then it is just the python logging. You could reconfigure the python logging module to set it to level so somewhere in your python code add something like:
(untested) |
Beta Was this translation helpful? Give feedback.
couldn't find a print, so my guess is then it is just the python logging. You could reconfigure the python logging module to set it to level
CRITICAL
, which would not print error messages.so somewhere in your python code add something like:
(untested)