Closed dawiinci closed 5 years ago
All of the self.logger
calls are passing unicode strings and msgTitle
and msgBody
are already encoded to UTF-8, but from this error message, the logger
object is only taking ASCII input. I think this is an upstream problem and the Indigo Python framework needs to setup a logger that takes UTF-8 input.
Try this version and see if special characters work:
https://github.com/IndigoDomotics/indigo-pushover/releases/tag/1.5.4
All of the
self.logger
calls are passing unicode strings andmsgTitle
andmsgBody
are already encoded to UTF-8, but from this error message, thelogger
object is only taking ASCII input. I think this is an upstream problem and the Indigo Python framework needs to setup a logger that takes UTF-8 input.
I don't believe this is true as the Python logger module is already unicode ready. Joe, what was the correction?
Changed all string substitution and concatenation to use .format()
Problem ist unfortunately NOT fixed. The same error appears, but the message is sent out like before.
@dawiinci - what line in 1.5.4 is the error on?
It was on line 121:
Traceback (most recent call last): File "plugin.py", line 121, in send UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 20: ordinal not in range(128)
Please turn debugging on in the plugin prefs and do the send again, then post the log segment.
There is no additional content shown with debug. The error message is exactly the same as in 1.5.3.
Hmm. With debug on, the plugin should be logging the content of the fields it's preparing to send. Also, the line numbers should have changed. I want to make sure I know exactly what line is throwing the error.
You do have to restart the plugin to get the debug logging to work.
In any case, don't worry about it. I'm able to recreate the problem on my system now.
Fixed in (new) 1.5.4. I reused the release number since it was never officially released.
https://github.com/IndigoDomotics/indigo-pushover/releases/tag/1.5.4
Please test this version.
Thank you, it works in 1.5.4.
I tried to send a value as a title in a message containing "Büro". This gives an error but sends the message regardless.
%%v:VAR_ID%%