2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2024-11-26 01:01:53 +00:00
This commit is contained in:
Martin Green 2022-06-19 01:33:08 +01:00
parent d560b17ab6
commit aad6b70736

View File

@ -129,7 +129,7 @@ def expowebpage(request, expowebpath, path):
return render(request, 'pagenotfound.html', {'path': path}, status="404")
try:
with open(os.path.normpath(expowebpath / path), "r", encoding='utf-8') as o:
with open(os.path.normpath(expowebpath / path).encode(sysdefaultencoding), "r", encoding='utf-8') as o:
html = o.read()
except:
# exception raised on debian with python 3.9.2 but not on WSL Ubuntu with python 3.9.5