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

Running under apache mod_wsgi. NoneType has no attribute 'put' #32

Open
blurks opened this issue Sep 3, 2019 · 1 comment
Open

Running under apache mod_wsgi. NoneType has no attribute 'put' #32

blurks opened this issue Sep 3, 2019 · 1 comment

Comments

@blurks
Copy link

blurks commented Sep 3, 2019

I'd like to run the youtube_dl_webgui under apache mod_wsgi, but i did not get it to work yet.
I am also quite new to flask an wsgi, so it might be my fault.

I allready tried to create a wsgi-script as described in the flask documentation:
from youtube_dl_webui.server import app as application

Apache loads that file without problems and displays the front page as it should, but any other actions result in an internal server error. Here is an example of an apache error log entry:

ERROR in app: Exception on /task/list [GET]
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 2446, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 1951, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 1820, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python3.7/dist-packages/flask/_compat.py", line 39, in reraise
raise value
File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 1949, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 1935, in dispatch_request
return self.view_functionsrule.endpoint
File "/usr/local/lib/python3.7/dist-packages/youtube_dl_webui-rolling-py3.7.egg/youtube_dl_webui/server.py", line 42, in list_task
MSG.put('list', payload)
AttributeError: 'NoneType' object has no attribute 'put'

I think the problem is MSG = None at the beginning of server.py. The MSG Variable is only initialized, when you have an Instance of the Server class and call it's run method. And I don't do that, when I load the app as described above. So i guess i should somehow make an instance of that Server class in my wsgi-script. But then i don't know with which values I should initialize it (espacialy what is msg_cli).

So what would be helpful to me is either a note on how to supply this app using apache (or any other wsgi production server), or a fix for server.py (if that is possible) or even a complete wsgi script one could use.

What do you think about that?

@MRDHR
Copy link

MRDHR commented Sep 10, 2019

I think this project is almost out of maintenance, and I found another alternative project.
This is the website https://github.com/MyopicBadger/guitube.
I hope it can help you.

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