jazzband / django-embed-video

Django app for easy embedding YouTube and Vimeo videos and music from SoundCloud.
http://django-embed-video.rtfd.org
MIT License
383 stars 135 forks source link

No thumbnails with Vimeo Backend #131

Closed Dreded closed 2 years ago

Dreded commented 4 years ago

good day, Appreciate the effort you(all) put in

So, I cannot get thumbnails to show, I have the same issue using the example project

in the example list view nothing will list, and has same error

if I use the video detail view without the thumbnail code it works without error...

{% video object.video as my_video %} URL: {{ my_video.url }} Backend: {{ my_video.backend }} {% video my_video 'small' %} {% endvideo %} The below renders but has a broken image and comes up with error below, {% video object.video as my_video %} URL: {{ my_video.url }} Thumbnail: {{ my_video.thumbnail }} Backend: {{ my_video.backend }} {% video my_video 'small' %} {% endvideo %}

here is the builtin test server error...

Django version 3.1, using settings 'mysite.settings' Starting development server at http://127.0.0.1:8000/ Quit the server with CONTROL-C. Attempt to render not existing video (https://vimeo.com/XxXxXxXxXx`)(changed for privacy) Traceback (most recent call last): File "/home/ryanh/Python/WSSTrainingWeb/.venv/lib/python3.8/site-packages/django/template/base.py", line 829, in _resolve_lookup current = current[bit] TypeError: 'VimeoBackend' object is not subscriptable

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/home/ryanh/Python/WSSTrainingWeb/.venv/lib/python3.8/site-packages/embed_video/backends.py", line 378, in get_info return json.loads(response.text)[0] File "/usr/lib/python3.8/json/init.py", line 357, in loads return _default_decoder.decode(s) File "/usr/lib/python3.8/json/decoder.py", line 340, in decode raise JSONDecodeError("Extra data", s, end) json.decoder.JSONDecodeError: Extra data: line 1 column 11 (char 10)

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/home/ryanh/Python/WSSTrainingWeb/.venv/lib/python3.8/site-packages/embed_video/templatetags/embed_video_tags.py", line 119, in render return self.render_block(context, backend) File "/home/ryanh/Python/WSSTrainingWeb/.venv/lib/python3.8/site-packages/embed_video/templatetags/embed_video_tags.py", line 152, in render_block output = self.nodelist_file.render(context) File "/home/ryanh/Python/WSSTrainingWeb/.venv/lib/python3.8/site-packages/django/template/base.py", line 938, in render bit = node.render_annotated(context) File "/home/ryanh/Python/WSSTrainingWeb/.venv/lib/python3.8/site-packages/django/template/base.py", line 905, in render_annotated return self.render(context) File "/home/ryanh/Python/WSSTrainingWeb/.venv/lib/python3.8/site-packages/django/template/base.py", line 988, in render output = self.filter_expression.resolve(context) File "/home/ryanh/Python/WSSTrainingWeb/.venv/lib/python3.8/site-packages/django/template/base.py", line 671, in resolve obj = self.var.resolve(context) File "/home/ryanh/Python/WSSTrainingWeb/.venv/lib/python3.8/site-packages/django/template/base.py", line 796, in resolve value = self._resolve_lookup(context) File "/home/ryanh/Python/WSSTrainingWeb/.venv/lib/python3.8/site-packages/django/template/base.py", line 837, in _resolve_lookup current = getattr(current, bit) File "/home/ryanh/Python/WSSTrainingWeb/.venv/lib/python3.8/site-packages/embed_video/backends.py", line 194, in thumbnail return self.get_thumbnail_url() File "/home/ryanh/Python/WSSTrainingWeb/.venv/lib/python3.8/site-packages/embed_video/backends.py", line 383, in get_thumbnail_url return self.info.get("thumbnail_large") File "/home/ryanh/Python/WSSTrainingWeb/.venv/lib/python3.8/site-packages/embed_video/backends.py", line 201, in info return self.get_info() File "/home/ryanh/Python/WSSTrainingWeb/.venv/lib/python3.8/site-packages/embed_video/backends.py", line 380, in get_info raise VideoDoesntExistException() embed_video.backends.VideoDoesntExistException [12/Aug/2020 16:34:27] "GET /1/ HTTP/1.1" 200 708 /home/ryanh/Python/WSSTrainingWeb/.venv/lib/python3.8/site-packages/django/views/generic/list.py:86: UnorderedObjectListWarning: Pagination may yield inconsistent results with an unordered object_list: <class 'videos.models.Video'> QuerySet. return self.paginator_class( Attempt to render not existing video (https://vimeo.com/XxXxXXXXXX)(changed for privacy) Traceback (most recent call last): File "/home/ryanh/Python/WSSTrainingWeb/.venv/lib/python3.8/site-packages/django/template/base.py", line 829, in _resolve_lookup current = current[bit] TypeError: 'VimeoBackend' object is not subscriptable

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/home/ryanh/Python/WSSTrainingWeb/.venv/lib/python3.8/site-packages/embed_video/backends.py", line 378, in get_info return json.loads(response.text)[0] File "/usr/lib/python3.8/json/init.py", line 357, in loads return _default_decoder.decode(s) File "/usr/lib/python3.8/json/decoder.py", line 340, in decode raise JSONDecodeError("Extra data", s, end) json.decoder.JSONDecodeError: Extra data: line 1 column 11 (char 10)

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/home/ryanh/Python/WSSTrainingWeb/.venv/lib/python3.8/site-packages/embed_video/templatetags/embed_video_tags.py", line 119, in render return self.render_block(context, backend) File "/home/ryanh/Python/WSSTrainingWeb/.venv/lib/python3.8/site-packages/embed_video/templatetags/embed_video_tags.py", line 152, in render_block output = self.nodelist_file.render(context) File "/home/ryanh/Python/WSSTrainingWeb/.venv/lib/python3.8/site-packages/django/template/base.py", line 938, in render bit = node.render_annotated(context) File "/home/ryanh/Python/WSSTrainingWeb/.venv/lib/python3.8/site-packages/django/template/base.py", line 905, in render_annotated return self.render(context) File "/home/ryanh/Python/WSSTrainingWeb/.venv/lib/python3.8/site-packages/django/template/base.py", line 988, in render output = self.filter_expression.resolve(context) File "/home/ryanh/Python/WSSTrainingWeb/.venv/lib/python3.8/site-packages/django/template/base.py", line 671, in resolve obj = self.var.resolve(context) File "/home/ryanh/Python/WSSTrainingWeb/.venv/lib/python3.8/site-packages/django/template/base.py", line 796, in resolve value = self._resolve_lookup(context) File "/home/ryanh/Python/WSSTrainingWeb/.venv/lib/python3.8/site-packages/django/template/base.py", line 837, in _resolve_lookup current = getattr(current, bit) File "/home/ryanh/Python/WSSTrainingWeb/.venv/lib/python3.8/site-packages/embed_video/backends.py", line 194, in thumbnail return self.get_thumbnail_url() File "/home/ryanh/Python/WSSTrainingWeb/.venv/lib/python3.8/site-packages/embed_video/backends.py", line 383, in get_thumbnail_url return self.info.get("thumbnail_large") File "/home/ryanh/Python/WSSTrainingWeb/.venv/lib/python3.8/site-packages/embed_video/backends.py", line 201, in info return self.get_info() File "/home/ryanh/Python/WSSTrainingWeb/.venv/lib/python3.8/site-packages/embed_video/backends.py", line 380, in get_info raise VideoDoesntExistException() embed_video.backends.VideoDoesntExistException `

aleksihakli commented 3 years ago

Is this issue still relevant? We haven't heard back in a while and I'm just checking if you are still facing the problem.