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

500 Error on GAE #25

Closed
docsuleman opened this issue Jan 16, 2015 · 8 comments
Closed

500 Error on GAE #25

docsuleman opened this issue Jan 16, 2015 · 8 comments

Comments

@docsuleman
Copy link

Hey Developers!

Thanks for making such wonderful application. I recently installed youtube-dl-api-server on GAE by using your documents as tutorial but I am receiving 500 server Error. All my libraries are up to date. and also in right directories (as far as i know). but still receiving this error.

PS: Please update youtube-dl in your example GAE application. the old one is not working since yesterday

@jaimeMF
Copy link
Owner

jaimeMF commented Jan 16, 2015

Works fine for me, please post the full log messages.

I have updated the GAE app, but please: use it only for testing, not for your own apps.

@docsuleman
Copy link
Author

Yes dear I am not using for any app. i was just testing.. and i thought to let you know :)

here is log file..

Traceback (most recent call last):
File "/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/runtime/wsgi.py", line 240, in Handle
handler = _config_handle.add_wsgi_middleware(self._LoadHandler())
File "/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/runtime/wsgi.py", line 299, in _LoadHandler
handler, path, err = LoadObject(self._handler)
File "/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/runtime/wsgi.py", line 85, in LoadObject
obj = import(path[0])
File "/base/data/home/apps/sytapi-11/0-1-2.381561582351970202/mainGAE.py", line 6, in
import youtube_dl
File "/base/data/home/apps/s
ytapi-11/0-1-2.381561582351970202/gae/lib/youtube_dl/init.py", line 15, in
from .options import (
File "/base/data/home/apps/sytapi-11/0-1-2.381561582351970202/gae/lib/youtube_dl/options.py", line 13, in
from .utils import (
File "/base/data/home/apps/s
ytapi-11/0-1-2.381561582351970202/gae/lib/youtube_dl/utils.py", line 9, in
import ctypes
File "/base/data/home/runtimes/python27/python27_dist/lib/python2.7/ctypes/init.py", line 10, in
from _ctypes import Union, Structure, Array
ImportError: No module named _ctypes

@jaimeMF
Copy link
Owner

jaimeMF commented Jan 16, 2015

Can you try replacing this line with sed -i "s/import ${module}/()# Removed ${module} import/g" "$f" and follow again the instructions?

@docsuleman
Copy link
Author

Running Setup-gae.sh give me this

$ ./devscripts/setup-gae.sh
Downloading python packages
DEPRECATION: --no-install, --no-download, --build, and --no-clean are deprecated.  See https://github.com/pypa/pip/issues/906.
Downloading/unpacking youtube-dl>=2014.03.12 (from -r ./gae/gae_requirements.txt (line 1))
  Downloading youtube_dl-2015.01.16-py2.py3-none-any.whl (780kB): 780kB downloaded
  Storing download in cache at ./gae/tmp/cache/https%3A%2F%2Fpypi.python.org%2Fpackages%2F2.7%2Fy%2Fyoutube_dl%2Fyoutube_dl-2015.01.16-py2.py3-none-any.whl
Downloading/unpacking flask (from -r ./gae/gae_requirements.txt (line 2))
  Using download cache from ./gae/tmp/cache/https%3A%2F%2Fpypi.python.org%2Fpackages%2Fsource%2FF%2FFlask%2FFlask-0.10.1.tar.gz
  Running setup.py (path:/root/youtube-dl-api-server/gae/build/flask/setup.py) egg_info for package flask

    warning: no files found matching '*' under directory 'tests'
    warning: no previously-included files matching '*.pyc' found under directory 'docs'
    warning: no previously-included files matching '*.pyo' found under directory 'docs'
    warning: no previously-included files matching '*.pyc' found under directory 'tests'
    warning: no previously-included files matching '*.pyo' found under directory 'tests'
    warning: no previously-included files matching '*.pyc' found under directory 'examples'
    warning: no previously-included files matching '*.pyo' found under directory 'examples'
    no previously-included directories found matching 'docs/_build'
    no previously-included directories found matching 'docs/_themes/.git'
Downloading/unpacking Werkzeug>=0.7 (from flask->-r ./gae/gae_requirements.txt (line 2))
  Using download cache from ./gae/tmp/cache/https%3A%2F%2Fpypi.python.org%2Fpackages%2Fsource%2FW%2FWerkzeug%2FWerkzeug-0.9.6.tar.gz
  Running setup.py (path:/root/youtube-dl-api-server/gae/build/Werkzeug/setup.py) egg_info for package Werkzeug

    warning: no files found matching '*' under directory 'werkzeug/debug/templates'
    warning: no files found matching '*' under directory 'tests'
    warning: no previously-included files matching '*.pyc' found under directory 'docs'
    warning: no previously-included files matching '*.pyo' found under directory 'docs'
    warning: no previously-included files matching '*.pyc' found under directory 'tests'
    warning: no previously-included files matching '*.pyo' found under directory 'tests'
    warning: no previously-included files matching '*.pyc' found under directory 'examples'
    warning: no previously-included files matching '*.pyo' found under directory 'examples'
    no previously-included directories found matching 'docs/_build'
Downloading/unpacking Jinja2>=2.4 (from flask->-r ./gae/gae_requirements.txt (line 2))
  Using download cache from ./gae/tmp/cache/https%3A%2F%2Fpypi.python.org%2Fpackages%2Fsource%2FJ%2FJinja2%2FJinja2-2.7.3.tar.gz
  Running setup.py (path:/root/youtube-dl-api-server/gae/build/Jinja2/setup.py) egg_info for package Jinja2

    warning: no files found matching '*' under directory 'custom_fixers'
    warning: no previously-included files matching '*' found under directory 'docs/_build'
    warning: no previously-included files matching '*.pyc' found under directory 'jinja2'
    warning: no previously-included files matching '*.pyc' found under directory 'docs'
    warning: no previously-included files matching '*.pyo' found under directory 'jinja2'
    warning: no previously-included files matching '*.pyo' found under directory 'docs'
Downloading/unpacking itsdangerous>=0.21 (from flask->-r ./gae/gae_requirements.txt (line 2))
  Using download cache from ./gae/tmp/cache/https%3A%2F%2Fpypi.python.org%2Fpackages%2Fsource%2Fi%2Fitsdangerous%2Fitsdangerous-0.24.tar.gz
  Running setup.py (path:/root/youtube-dl-api-server/gae/build/itsdangerous/setup.py) egg_info for package itsdangerous

    warning: no previously-included files matching '*' found under directory 'docs/_build'
Downloading/unpacking markupsafe (from Jinja2>=2.4->flask->-r ./gae/gae_requirements.txt (line 2))
  Using download cache from ./gae/tmp/cache/https%3A%2F%2Fpypi.python.org%2Fpackages%2Fsource%2FM%2FMarkupSafe%2FMarkupSafe-0.23.tar.gz
  Running setup.py (path:/root/youtube-dl-api-server/gae/build/markupsafe/setup.py) egg_info for package markupsafe

Successfully downloaded youtube-dl flask Werkzeug Jinja2 itsdangerous markupsafe
Copying python packages to ./gae/lib
Patching youtube_dl
sed: can't read s/import fcntl/()# Removed fcntl import/g: No such file or directory
sed: can't read s/import fcntl/()# Removed fcntl import/g: No such file or directory
sed: can't read s/import fcntl/()# Removed fcntl import/g: No such file or directory
sed: can't read s/import fcntl/()# Removed fcntl import/g: No such file or directory
sed: can't read s/import fcntl/()# Removed fcntl import/g: No such file or directory
sed: can't read s/import fcntl/()# Removed fcntl import/g: No such file or directory
sed: can't read s/import fcntl/()# Removed fcntl import/g: No such file or directory
sed: can't read s/import fcntl/()# Removed fcntl import/g: No such file or directory
.
.
.

sed: can't read s/import ctypes/()# Removed ctypes import/g: No such file or directory
sed: can't read s/import ctypes/()# Removed ctypes import/g: No such file or directory
sed: can't read s/import ctypes/()# Removed ctypes import/g: No such file or directory
sed: can't read s/import ctypes/()# Removed ctypes import/g: No such file or directory
sed: can't read s/import ctypes/()# Removed ctypes import/g: No such file or directory
sed: can't read s/import ctypes/()# Removed ctypes import/g: No such file or directory
sed: can't read s/import ctypes/()# Removed ctypes import/g: No such file or directory
sed: can't read s/import ctypes/()# Removed ctypes import/g: No such file or directory
sed: can't read s/import ctypes/()# Removed ctypes import/g: No such file or directory
.
.
.
sed: can't read s/import netrc/()# Removed netrc import/g: No such file or directory
sed: can't read s/import netrc/()# Removed netrc import/g: No such file or directory
sed: can't read s/import netrc/()# Removed netrc import/g: No such file or directory
sed: can't read s/import netrc/()# Removed netrc import/g: No such file or directory

is it normal?

@jaimeMF
Copy link
Owner

jaimeMF commented Jan 16, 2015

That's because you are probably using GNU sed, if you edit the file as I said it should work (I just tested it).

Anyway, I will switch to something other than sed, because the -i option is not compatible between the GNU and the BSD versions.

@docsuleman
Copy link
Author

Thank you so much.. its working now.. actually the link you shared was broken and i edited the wrong line :) sorry my bad.. alothough its giving me another error right now .. its about ERROR: Unable to extract JS player URL; please report this issue on https://yt-dl.org/bug.. but i guess if i update YOUTUBE-DL issue will be fixed.

@jaimeMF
Copy link
Owner

jaimeMF commented Jan 16, 2015

My fault, it was this line

I have pushed a change that should fixed, if it doesn't work please open a new issue. Thanks for the report.

@jaimeMF
Copy link
Owner

jaimeMF commented Jan 16, 2015

I forgot about the other message, ./devscripts/setup-gae.sh should upgrade youtube-dl. If it still fails check first if you can play the video in the broswer. If it works: try running youtube-dl URL, if that fails it should be reported to youtube-dl.

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