question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Opening a video crashes with KeyError: u'videos'

See original GitHub issue

Bug report

Your Environment

  • Netflix add-on version: 1.2.0
  • Operating system version/name: CoreElec 9.2.2
  • Device model: Tanix TX92

Used Operating system:

  • Android
  • iOS
  • Linux
  • OSX
  • Raspberry-Pi
  • Windows

Describe the bug

Sometimes it crashed when trying to open some videos

Steps to reproduce the behavior

in most cases it crashed on this anime series
https://www.netflix.com/watch/81033447

Possible fix

resources/lib/kodi/infolabels.py:257

Original:

raw_data = api.get_video_raw_data(videoids_to_request)
for videoid in videoids_to_request:
    infos = get_info(videoid, raw_data['videos'][videoid.value], raw_data, profile_language_code)[0]

Fixed

raw_data = api.get_video_raw_data(videoids_to_request)
    if raw_data:
        for videoid in videoids_to_request:
            infos = get_info(videoid, raw_data['videos'][videoid.value], raw_data, profile_language_code)[0]

Debug log

ERROR: [plugin.video.netflix (2)] Traceback (most recent call last):
    File "/storage/.kodi/addons/plugin.video.netflix/resources/lib/run_addon.py", line 207, in run
    route([part for part in g.PATH.split('/') if part])
    File "/storage/.kodi/addons/plugin.video.netflix/resources/lib/run_addon.py", line 38, in lazy_login_wrapper
    return func(*args, **kwargs)
    File "/storage/.kodi/addons/plugin.video.netflix/resources/lib/run_addon.py", line 62, in route
    play(videoid=pathitems[1:])
    File "/storage/.kodi/addons/plugin.video.netflix/resources/lib/common/videoid.py", line 295, in wrapper
    return func(*args, **kwargs)
    File "/storage/.kodi/addons/plugin.video.netflix/resources/lib/common/logging.py", line 143, in timing_wrapper
    return func(*args, **kwargs)
    File "/storage/.kodi/addons/plugin.video.netflix/resources/lib/navigation/player.py", line 93, in play
    [videoid, videoid_next_episode] if videoid_next_episode else [videoid])
    File "/storage/.kodi/addons/plugin.video.netflix/resources/lib/kodi/infolabels.py", line 259, in get_info_from_netflix
    infos = get_info(videoid, raw_data['videos'][videoid.value], raw_data, profile_language_code)[0]
KeyError: u'videos'

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:15 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
CastagnaITcommented, May 2, 2020
0reactions
jakermxcommented, May 2, 2020

Just FYI u means that the followed string should be formatted on UTF-8 basis the Error you got points that it is not available on the region your where browsing from…i.e. I am from Mexico and some titles are not available here, I can add them to My List while using VPN but when I dont use it, I can see it listed but not available to play… It should be great to have a human based rspond, saying…“mmmhh it is not available at the time” instead of getting an error

😉

Read more comments on GitHub >

github_iconTop Results From Across the Web

Videos not found, causes crash · Issue #38 - GitHub
KeyError : u'videos'. It appears that some accounts may not have videos? This wasn't happening earlier, so it appears the videos folder has ......
Read more >
VLC Crashing when loading any video - Unix Stack Exchange
When trying to open any video in my Linux distro, be it an mp4 file or movie ISO, VLC would immediately crash. None...
Read more >
How can I improve my video upload currently crashes the app ...
The problem can be caused by logging. Retrofit's logger reads your video binary and here the OOM exception raised. To prevent it, disable...
Read more >
How to Fix Laptop Keep Crashing When Watching Videos[2022]
Video playback troubleshoot is remarkable enough to check and fix the issues by its own, follow the steps to use this utility;. Step...
Read more >
Microsoft Edge keep crashing after I opened some Youtube ...
It's happened for 2 days now. The Browser keep crashing after I opened some videos on Youtube. I have 5 extensions.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found