fastapi-webstarter-demo
fastapi-webstarter-demo copied to clipboard
Error NameError: name 'create_workspace' is not defined
Hi Shinokada, I completed you codes but when trying upload a file, there is error:
... INFO: 219.74.109.137:0 - "POST /upload/new/ HTTP/1.1" 500 Internal Server Error ERROR: Exception in ASGI application Traceback (most recent call last): File "/usr/local/lib/python3.7/dist-packages/uvicorn/protocols/http/h11_impl.py", line 394, in run_asgi result = await app(self.scope, self.receive, self.send) File "/usr/local/lib/python3.7/dist-packages/uvicorn/middleware/proxy_headers.py", line 45, in call return await self.app(scope, receive, send) File "/usr/local/lib/python3.7/dist-packages/fastapi/applications.py", line 190, in call await super().call(scope, receive, send) File "/usr/local/lib/python3.7/dist-packages/starlette/applications.py", line 111, in call await self.middleware_stack(scope, receive, send) File "/usr/local/lib/python3.7/dist-packages/starlette/middleware/errors.py", line 181, in call raise exc from None File "/usr/local/lib/python3.7/dist-packages/starlette/middleware/errors.py", line 159, in call await self.app(scope, receive, _send) File "/usr/local/lib/python3.7/dist-packages/starlette/exceptions.py", line 82, in call raise exc from None File "/usr/local/lib/python3.7/dist-packages/starlette/exceptions.py", line 71, in call await self.app(scope, receive, sender) File "/usr/local/lib/python3.7/dist-packages/starlette/routing.py", line 566, in call await route.handle(scope, receive, send) File "/usr/local/lib/python3.7/dist-packages/starlette/routing.py", line 227, in handle await self.app(scope, receive, send) File "/usr/local/lib/python3.7/dist-packages/starlette/routing.py", line 41, in app response = await func(request) File "/usr/local/lib/python3.7/dist-packages/fastapi/routing.py", line 189, in app dependant=dependant, values=values, is_coroutine=is_coroutine File "/usr/local/lib/python3.7/dist-packages/fastapi/routing.py", line 135, in run_endpoint_function return await dependant.call(**values) File "/content/fastapi-web-starter/app/routers/upload.py", line 24, in post_upload workspace = create_workspace() NameError: name 'create_workspace' is not defined
You need Python 3.8.6. Please see the runtime.txt. And let me know.
I'm using Colab with Python 3.6. 9. Is this issue?
It can be. Please try to install 3.8.6. And let me know. I will update FastAPI and dependencies sometime soon.
On Wed, Aug 11, 2021 at 18:49 gnurtcouq @.***> wrote:
I'm using Colab with Python 3.6. 9. Is this issue?
— You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/shinokada/fastapi-drag-and-drop/issues/4#issuecomment-896680348, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABD66FUTMMYEAKKFVB6B3TT4JBTRANCNFSM5B56SVRQ .
-- Shinichi Okada Math Teacher Secondary School Canadian Academy
4-1 Koyo-cho Naka Higashinada-ku, Kobe 658-0032 ph: +81 78 857 0100 (int) or 078 857 0100 (Japan)
Hi Shinokada, Colab does not allow me t upgrade to Python 3.8.6.. The latest version of Colab is using Python 3.7.11. Can you let me know when you release FastAPI can run on Python 3.7.11 . Thank a lot
Hi Shinokada, after upgrade to the latest version of Python (3.9). The codes are working perfectly.
If I want to change the codes so it can download sound file (e.g.*.wav), how can I achieve this?
Thx a lot for your help.