Error: (ProcessOutbound) "not type of Unicode"

Python and python framework

Moderator: leecollings

Post Reply
ajarzyn
Posts: 9
Joined: Tuesday 13 October 2020 23:04
Target OS: -
Domoticz version:
Contact:

Error: (ProcessOutbound) "not type of Unicode"

Post by ajarzyn »

I'm writing this message for future reference.

If you're writing python plugin with Domoticz's connection in it, and you noticed following error:

Code: Select all

Error: (ProcessOutbound) Send request Python object parameter was not of type Unicode or Byte, ignored.
Make sure that all values for creating connection and sending data are correct. (Case sensitive)

I've lost three night scratching my head to figure out what's going on only to finally find out that protocol for the connection must be written with capital letters.

Thus 'HTTP' and not 'http'.

Side note, maybe it wouldn't be such a bad idea to:
1. either handle it on the side of Connection object to capitalize all data is required
2. or describe it in documentation (wiki page for developing python plugin) I know there is a list of valid values, but maybe it would be good idea to add something like: "Values are case sensitive"
3. or maybe better error detection system to notify which value Domoticz's Connection object does not like.

I know it's my fault not to spot that earlier but I hope no one would have to go though same problem ever again.

Cheers.

PS. Thank you for Domoticz, you are awesome!
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest