profile
viewpoint

Ask questions[Bug] Missing hash key: "adaptiveFormats" (KeyError)

<!-- Please use the search function to check if the bug you found has already been reported by someone else --> <!-- If you want to suggest a new feature please use "Feature request" instead --> <!-- If you want to suggest an enhancement to an existing feature please use "Enhancement" instead -->

Describe the bug <!-- A clear and concise description of what the bug is. --> I can’t play this video https://redirect.invidious.io/watch?v=RGU-4iVs7X4

Steps to Reproduce Try to play this video https://redirect.invidious.io/watch?v=RGU-4iVs7X4

Logs <!-- If applicable, copy the log that appear in the browser page where the error is reported. --> Title: Missing hash key: "adaptiveFormats" (KeyError) Date: 2021-06-18T12:31:45Z Route: /watch?v=RGU-4iVs7X4 Version: 2021.06.14-3146678 @ master <details> <summary>Backtrace</summary> <p>

Missing hash key: "adaptiveFormats" (KeyError)
  from /usr/share/crystal/src/hash.cr:1027:11 in '[]'
  from /usr/share/crystal/src/json/any.cr:102:7 in '[]'
  from src/invidious/videos.cr:765:34 in 'is_vr'
  from src/invidious/views/watch.ecr:61:13 in 'handle'
  from src/invidious.cr:282:1 in '->'
  from /usr/share/crystal/src/primitives.cr:255:3 in '->'
  from /usr/share/crystal/src/primitives.cr:255:3 in 'process_request'
  from lib/kemal/src/kemal/route_handler.cr:17:7 in 'call'
  from /usr/share/crystal/src/http/server/handler.cr:28:7 in 'call_next'
  from lib/kemal/src/kemal/websocket_handler.cr:13:14 in 'call'
  from /usr/share/crystal/src/http/server/handler.cr:28:7 in 'call_next'
  from lib/kemal/src/kemal/filter_handler.cr:21:7 in 'call'
  from /usr/share/crystal/src/http/server/handler.cr:28:7 in 'call_next'
  from src/invidious/helpers/handlers.cr:212:5 in 'call'
  from /usr/share/crystal/src/http/server/handler.cr:28:7 in 'call_next'
  from src/invidious/helpers/handlers.cr:94:12 in 'call'
  from /usr/share/crystal/src/http/server/handler.cr:28:7 in 'call_next'
  from src/invidious/helpers/handlers.cr:145:12 in 'call'
  from /usr/share/crystal/src/http/server/handler.cr:28:7 in 'call_next'
  from src/invidious/helpers/handlers.cr:70:5 in 'call'
  from /usr/share/crystal/src/http/server/handler.cr:28:7 in 'call_next'
  from src/invidious/helpers/static_file_handler.cr:189:11 in 'call'
  from /usr/share/crystal/src/http/server/handler.cr:28:7 in 'call_next'
  from lib/kemal/src/kemal/exception_handler.cr:8:7 in 'call'
  from /usr/share/crystal/src/http/server/handler.cr:28:7 in 'call_next'
  from src/invidious/helpers/logger.cr:17:35 in 'call'
  from /usr/share/crystal/src/http/server/handler.cr:28:7 in 'call_next'
  from lib/kemal/src/kemal/init_handler.cr:12:7 in 'call'
  from /usr/share/crystal/src/http/server/request_processor.cr:51:11 in 'process'
  from /usr/share/crystal/src/http/server.cr:513:5 in 'handle_client'
  from /usr/share/crystal/src/http/server.cr:468:13 in '->'
  from /usr/share/crystal/src/primitives.cr:255:3 in 'run'
  from /usr/share/crystal/src/fiber.cr:92:34 in '->'
  from ???

</p> </details>

Screenshots <!-- If applicable, add screenshots to help explain your problem. -->

Additional context <!-- Add any other context about the problem here.

  • Browser (if applicable):
  • OS (if applicable): --> NewPipe only provides a 360p stream, so does youtube-dl. Usually there are 360p and 720p streams that contain both video and audio, called formatStreams in the invidious API. adaptiveFormats either provide only audio or only video.

The Invidious API returns [] so it should be an easy empty check.

iv-org/invidious

Answer questions rex4539

https://yewtu.be/watch?v=XzgDiyD4pU0

Title: Missing hash key: "adaptiveFormats" (KeyError) Date: 2021-06-29T20:16:17Z Route: /watch?v=XzgDiyD4pU0 Version: 2021.06.27-bfc5500 @ master <details> <summary>Backtrace</summary> <p>

Missing hash key: "adaptiveFormats" (KeyError)
  from /usr/share/crystal/src/hash.cr:1027:11 in '[]'
  from /usr/share/crystal/src/json/any.cr:102:7 in '[]'
  from src/invidious/videos.cr:769:34 in 'is_vr'
  from src/invidious/views/watch.ecr:61:13 in 'handle'
  from src/invidious.cr:299:1 in '->'
  from /usr/share/crystal/src/primitives.cr:255:3 in '->'
  from /usr/share/crystal/src/primitives.cr:255:3 in 'process_request'
  from lib/kemal/src/kemal/route_handler.cr:17:7 in 'call'
  from /usr/share/crystal/src/http/server/handler.cr:28:7 in 'call_next'
  from lib/kemal/src/kemal/websocket_handler.cr:13:14 in 'call'
  from /usr/share/crystal/src/http/server/handler.cr:28:7 in 'call_next'
  from lib/kemal/src/kemal/filter_handler.cr:21:7 in 'call'
  from /usr/share/crystal/src/http/server/handler.cr:28:7 in 'call_next'
  from src/invidious/helpers/handlers.cr:212:5 in 'call'
  from /usr/share/crystal/src/http/server/handler.cr:28:7 in 'call_next'
  from src/invidious/helpers/handlers.cr:94:12 in 'call'
  from /usr/share/crystal/src/http/server/handler.cr:28:7 in 'call_next'
  from src/invidious/helpers/handlers.cr:145:12 in 'call'
  from /usr/share/crystal/src/http/server/handler.cr:28:7 in 'call_next'
  from src/invidious/helpers/handlers.cr:70:5 in 'call'
  from /usr/share/crystal/src/http/server/handler.cr:28:7 in 'call_next'
  from src/invidious/helpers/static_file_handler.cr:189:11 in 'call'
  from /usr/share/crystal/src/http/server/handler.cr:28:7 in 'call_next'
  from lib/kemal/src/kemal/exception_handler.cr:8:7 in 'call'
  from /usr/share/crystal/src/http/server/handler.cr:28:7 in 'call_next'
  from src/invidious/helpers/logger.cr:17:35 in 'call'
  from /usr/share/crystal/src/http/server/handler.cr:28:7 in 'call_next'
  from lib/kemal/src/kemal/init_handler.cr:12:7 in 'call'
  from /usr/share/crystal/src/http/server/request_processor.cr:51:11 in 'process'
  from /usr/share/crystal/src/http/server.cr:513:5 in 'handle_client'
  from /usr/share/crystal/src/http/server.cr:468:13 in '->'
  from /usr/share/crystal/src/primitives.cr:255:3 in 'run'
  from /usr/share/crystal/src/fiber.cr:92:34 in '->'
  from ???

</p> </details>

useful!
source:https://uonfu.com/
Github User Rank List