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

Remove empty js script from template #189

Merged
merged 2 commits into from
Jan 2, 2022

Conversation

haaavk
Copy link
Contributor

@haaavk haaavk commented Jan 2, 2022

Serving empty file raise ValueError in gunicorn.

[2022-01-02 12:11:26 +0100] [8] [ERROR] Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/gunicorn/workers/sync.py", line 182, in handle_request
resp.write_file(respiter)
File "/usr/local/lib/python3.10/site-packages/gunicorn/http/wsgi.py", line 385, in write_file
if not self.sendfile(respiter):
File "/usr/local/lib/python3.10/site-packages/gunicorn/http/wsgi.py", line 375, in sendfile
self.sock.sendfile(respiter.filelike, count=nbytes)
File "/usr/local/lib/python3.10/socket.py", line 484, in sendfile
return self._sendfile_use_sendfile(file, offset, count)
File "/usr/local/lib/python3.10/socket.py", line 348, in _sendfile_use_sendfile
self._check_sendfile_params(file, offset, count)
File "/usr/local/lib/python3.10/socket.py", line 462, in _check_sendfile_params
raise ValueError(
ValueError: count must be a positive integer (got 0)

Serving empty file raise ValueError in gunicorn
@milesmcc
Copy link
Owner

milesmcc commented Jan 2, 2022

Weird that Gunicorn does that. Oh well. Thanks for the PR. Before I merge, would you mind also removing https://github.com/milesmcc/shynet/blob/master/shynet/dashboard/static/dashboard/js/base.js as well? That way we don’t have an empty unused file lying around.

@milesmcc milesmcc merged commit a460d1f into milesmcc:master Jan 2, 2022
@milesmcc
Copy link
Owner

milesmcc commented Jan 2, 2022

Great, thanks!

@christophemacabiau christophemacabiau mentioned this pull request Jan 10, 2022
@haaavk haaavk deleted the fix-gunicorn-ValueError branch February 4, 2022 08:59
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

Successfully merging this pull request may close these issues.

2 participants