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.

Error on webserver with Norwegian characters

If you have a question or need help, this is the place to be.
Post Reply
Pallantir
Posts: 41
Joined: Mon May 14, 2012 6:41 pm

Error on webserver with Norwegian characters

Post by Pallantir »

One of my room, the cooling room, has a Norwegian character in it. That gives me wild errors from the webserver when I try to use it in the webpage. Not as a variable, even. It's just a part of the text there. This is what I get:

Code: Select all

15:05:02   Webserver error /
15:05:02   Exception 'utf8' codec can't decode bytes in position 364-368: unsupported Unicode code range
15:05:02   ----------------------------------------
15:05:02   Exception happened during processing of request from ('192.168.0.27', 50157)
15:05:02   Traceback (most recent call last):
15:05:02     File "SocketServer.pyc", line 558, in process_request_thread
15:05:02     File "SocketServer.pyc", line 320, in finish_request
15:05:02     File "SocketServer.pyc", line 615, in __init__
15:05:02     File "BaseHTTPServer.pyc", line 329, in handle
15:05:02     File "BaseHTTPServer.pyc", line 323, in handle_one_request
15:05:02     File "C:\Programfiler\EventGhost\plugins\Webserver\__init__.py", line 281, in do_GET
15:05:02       self.SendContent(path)
15:05:02     File "C:\Programfiler\EventGhost\plugins\Webserver\__init__.py", line 206, in SendContent
15:05:02       template = self.environment.get_template(fsPath)
15:05:02     File "jinja2\environment.pyc", line 716, in get_template
15:05:02     File "jinja2\environment.pyc", line 690, in _load_template
15:05:02     File "jinja2\loaders.pyc", line 115, in load
15:05:02     File "C:\Programfiler\EventGhost\plugins\Webserver\__init__.py", line 78, in get_source
15:05:02       contents = sourceFile.read().decode("utf-8")
15:05:02     File "encodings\utf_8.pyc", line 16, in decode
15:05:02   UnicodeDecodeError: 'utf8' codec can't decode bytes in position 364-368: unsupported Unicode code range
Is there anything I can do with that?
Post Reply