You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The logs show that wsgi.file_wrapper is not supported:
[ERROR] Exception on /static/build/main.68be5054.css [GET]
Traceback (most recent call last):
File "/home/alexandre/code/whoogle-search/venv/lib/python3.9/site-packages/flask/app.py", line 2446, in wsgi_app
response = self.full_dispatch_request()
File "/home/alexandre/code/whoogle-search/venv/lib/python3.9/site-packages/flask/app.py", line 1951, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/home/alexandre/code/whoogle-search/venv/lib/python3.9/site-packages/flask/app.py", line 1820, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/home/alexandre/code/whoogle-search/venv/lib/python3.9/site-packages/flask/_compat.py", line 39, in reraise
raise value
File "/home/alexandre/code/whoogle-search/venv/lib/python3.9/site-packages/flask/app.py", line 1949, in full_dispatch_request
rv = self.dispatch_request()
File "/home/alexandre/code/whoogle-search/venv/lib/python3.9/site-packages/flask/app.py", line 1935, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/home/alexandre/code/whoogle-search/venv/lib/python3.9/site-packages/flask/helpers.py", line 1081, in send_static_file
return send_from_directory(
File "/home/alexandre/code/whoogle-search/venv/lib/python3.9/site-packages/flask/helpers.py", line 771, in send_from_directory
return send_file(filename, **options)
File "/home/alexandre/code/whoogle-search/venv/lib/python3.9/site-packages/flask/helpers.py", line 640, in send_file
data = wrap_file(request.environ, file)
File "/home/alexandre/code/whoogle-search/venv/lib/python3.9/site-packages/werkzeug/wsgi.py", line 529, in wrap_file
return environ.get("wsgi.file_wrapper", FileWrapper)(file, buffer_size)
TypeError: 'NoneType' object is not callable
@dalf so, aside from supporting this, since is optional, this is actually a bug, as Granian should not populate the wsgi.file_wrapper key of environ.
I gonna leave this opened for the support request, while the bug is now tracked in #41. Once closed, the app you tried should work without the file wrapper support.
I've tried to run https://github.com/benbusby/whoogle-search a WSGI application using
granian --interface wsgi app
.The logs show that
wsgi.file_wrapper
is not supported:For reference: https://peps.python.org/pep-3333/#optional-platform-specific-file-handling
The text was updated successfully, but these errors were encountered: