From 836387057a9be58e990325c9461db0923127fa6d Mon Sep 17 00:00:00 2001 From: Martin Green Date: Wed, 22 Jun 2022 08:52:04 +0100 Subject: [PATCH] Now the servers locale is utf8, try opening files spectifying path using a text string --- core/views/expo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/views/expo.py b/core/views/expo.py index 05e3642..b419e48 100644 --- a/core/views/expo.py +++ b/core/views/expo.py @@ -226,7 +226,7 @@ def expopage(request, path): filetobeopened = os.path.normpath(expowebpath / path) try: - content = open(filetobeopened.encode(sysdefaultencoding), "rb") + content = open(filetobeopened, "rb") content_type=getmimetype(path) return HttpResponse(content = content, content_type=content_type) except IOError: