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 in video embed helper (list index out of range) #283

Closed
alexlittle opened this issue Jan 7, 2016 · 1 comment
Closed

Error in video embed helper (list index out of range) #283

alexlittle opened this issue Jan 7, 2016 · 1 comment
Assignees
Milestone

Comments

@alexlittle
Copy link
Member

Internal Server Error: /content/video-embed-helper/
Traceback (most recent call last):
File "/xxxxxxxxxxxxxxxxxxx/env/lib/python2.7/site-packages/django/core/handlers/base.py", line 132, in get_response
response = wrapped_callback(request, _callback_args, *_callback_kwargs)
File "/xxxxxxxxxxxxxxxxxxx/oppia/content/views.py", line 45, in video_embed_helper
file_length = get_length(video_local_file)
File "/xxxxxxxxxxxxxxx/oppia/content/views.py", line 91, in get_length
time_components = duration_list[0].split(',')[0].split(':')
IndexError: list index out of range

Request repr():
<WSGIRequest
path:/content/video-embed-helper/,
GET:<QueryDict: {}>,
POST:<QueryDict: {u'csrfmiddlewaretoken': [u'xxxxxxxxxxxxxxxxxx'], u'submit': [u'Go'], u'video_url': [u'http://moodle.jhpiego.org/media/PAC/1-2.mp4']}>,

@alexlittle
Copy link
Member Author

Another error when not using http:

Internal Server Error: /content/video-embed-helper/
Traceback (most recent call last):
File "/xxxxxxxxxxxxxxxx/env/lib/python2.7/site-packages/django/core/handlers/base.py", line 132, in get_response
response = wrapped_callback(request, _callback_args, *_callback_kwargs)
File "/xxxxxxxxxxxxxxxxx/django-oppia/oppia/content/views.py", line 39, in video_embed_helper
urllib.urlretrieve(video_url, filename=video_local_file)
File "/usr/lib/python2.7/urllib.py", line 94, in urlretrieve
return _urlopener.retrieve(url, filename, reporthook, data)
File "/usr/lib/python2.7/urllib.py", line 240, in retrieve
fp = self.open(url, data)
File "/usr/lib/python2.7/urllib.py", line 205, in open
return self.open_unknown(fullurl, data)
File "/usr/lib/python2.7/urllib.py", line 217, in open_unknown
raise IOError, ('url error', 'unknown url type', type)
IOError: [Errno url error] unknown url type: 'sftp'

Request repr():
<WSGIRequest
path:/content/video-embed-helper/,
GET:<QueryDict: {}>,
POST:<QueryDict: {u'csrfmiddlewaretoken': [u''], u'submit': [u'Go'], u'video_url': [u'sftp://ftpmoodle@moodle.http://xxxxxxxxxxxxxxx/media/ENC/Page19-20_a.mp4']}>,

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

No branches or pull requests

1 participant