Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error NameError: name 'create_workspace' is not defined #4

Open
gnurtcouq opened this issue Aug 11, 2021 · 5 comments
Open

Error NameError: name 'create_workspace' is not defined #4

gnurtcouq opened this issue Aug 11, 2021 · 5 comments

Comments

@gnurtcouq
Copy link

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

@shinokada
Copy link
Owner

You need Python 3.8.6. Please see the runtime.txt.
And let me know.

@gnurtcouq
Copy link
Author

I'm using Colab with Python 3.6. 9. Is this issue?

@shinokada
Copy link
Owner

shinokada commented Aug 11, 2021 via email

@gnurtcouq
Copy link
Author

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

@gnurtcouq
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants