I am using autoremote to send the last message received on my phone to eventghost and i am facing the following problem:
Whenever the message contains Greek characters i get the following error:
22:24:21 Unhandled exception in WorkerThread <ActionThread>:
22:24:21 Callers stack:
22:24:21 File "threading.pyc", line 504, in __bootstrap
22:24:21 File "threading.pyc", line 532, in __bootstrap_inner
22:24:21 File "threading.pyc", line 484, in run
22:24:21 File "C:\Program Files (x86)\EventGhost\eg\Classes\ThreadWorker.py", line 354, in __MainLoop
22:24:21 self.__DoOneEvent()
22:24:21 File "C:\Program Files (x86)\EventGhost\eg\Classes\ThreadWorker.py", line 342, in __DoOneEvent
22:24:21 eg.PrintTraceback()
22:24:21 File "C:\Program Files (x86)\EventGhost\eg\Classes\ThreadWorker.py", line 289, in HandleAction
22:24:21 action()
22:24:21 File "C:\Program Files (x86)\EventGhost\eg\Classes\EventThread.py", line 85, in Transfer
22:24:21 event.SetShouldEnd()
22:24:21 Traceback (most recent call last) (1600):
22:24:21 File "C:\Program Files (x86)\EventGhost\eg\Classes\ThreadWorker.py", line 326, in __DoOneEvent
22:24:21 self.HandleAction(action)
22:24:21 File "C:\Program Files (x86)\EventGhost\eg\Classes\ActionThread.py", line 87, in HandleAction
22:24:21 action()
22:24:21 File "C:\Program Files (x86)\EventGhost\eg\Classes\ThreadWorker.py", line 62, in __call__
22:24:21 self.returnValue = self.func(*self.args, **self.kwargs)
22:24:21 File "C:\Program Files (x86)\EventGhost\eg\Classes\EventGhostEvent.py", line 163, in Execute
22:24:21 LogEvent(self)
22:24:21 File "C:\Program Files (x86)\EventGhost\eg\Classes\Log.py", line 224, in LogEvent
22:24:21 mesg = eventstring + ' ' + repr(payload)
22:24:21 File "C:\Program Files (x86)\EventGhost\plugins\AutoRemote\__init__.py", line 129, in __repr__
22:24:21 return self.__str__()
22:24:21 File "C:\Program Files (x86)\EventGhost\plugins\AutoRemote\__init__.py", line 126, in __str__
22:24:21 return "params: " + str(self.arpar) + "; command(s): " + str(self.arcomm) + ";"
22:24:21 UnicodeEncodeError: 'ascii' codec can't encode characters in position 1-4: ordinal not in range(128)
If it is only English the message gets displayed normally.
Any ideas?
Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details
If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.
If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.
osd and Unicode characters
Re: osd and Unicode characters
I have the same problem
Don't know how to make it support the other code
Don't know how to make it support the other code
Re: osd and Unicode characters
It doesn't look like the plug-in used unicode strings. You might need to modify it. See http://docs.python.org/2/howto/unicode.html.
Edit: Ignore my answer and listen to krambriw.
Edit: Ignore my answer and listen to krambriw.
Last edited by kkl on Tue Jun 11, 2013 4:23 pm, edited 1 time in total.
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: osd and Unicode characters
The data needs to be encoded in utf-8 in a similar way I did it for another plugin, like 'deviceName.encode('utf-8'))'
Best, Walter
Best, Walter
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM