From 41dfe08d2a9da94d703351e250f31e82162e8b6f Mon Sep 17 00:00:00 2001 From: Martin Green Date: Sat, 18 Jun 2022 22:48:30 +0100 Subject: [PATCH] try coverting path from utf8 --- 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 441d4bc..d22d516 100644 --- a/core/views/expo.py +++ b/core/views/expo.py @@ -223,7 +223,7 @@ def expopage(request, path): filetobeopened = os.path.normpath(expowebpath / path) try: - return HttpResponse(content=open(filetobeopened, "rb"), content_type=getmimetype(path)) + return HttpResponse(content=open(unicode(filetobeopened, 'utf8'), "rb"), content_type=getmimetype(path)) except IOError: return render(request, 'pagenotfound.html', {'path': path}, status="404")