From 3bd5e14bc1c54716824b31e7fc3586c39076ca8c Mon Sep 17 00:00:00 2001 From: Simon Willison Date: Sun, 23 Jun 2019 08:09:41 -0700 Subject: [PATCH] Fix for Python 3.5 --- datasette/utils/asgi.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/datasette/utils/asgi.py b/datasette/utils/asgi.py index 2aeeb836..8add01b1 100644 --- a/datasette/utils/asgi.py +++ b/datasette/utils/asgi.py @@ -205,7 +205,7 @@ async def asgi_send_file( if filename: headers["Content-Disposition"] = 'attachment; filename="{}"'.format(filename) first = True - async with aiofiles.open(filepath, mode="rb") as fp: + async with aiofiles.open(str(filepath), mode="rb") as fp: if first: await asgi_start( send,