pyatv.exceptions.HttpError: HTTP/1.1 method GET failed with code 500: Internal Server Error
Traceback (most recent call last):
File ".../pyatv/scripts/atvremote.py", line 998, in _run_application
return await cli_handler(loop)
File ".../pyatv/scripts/atvremote.py", line 727, in cli_handler
return await _handle_commands(args, config, storage, loop)
File ".../pyatv/scripts/atvremote.py", line 877, in _handle_commands
ret = await _handle_device_command(args, cmd, atv, storage, loop)
File ".../pyatv/scripts/atvremote.py", line 933, in _handle_device_command
return await _exec_command(atv.stream, cmd, True, *cmd_args)
File ".../pyatv/scripts/atvremote.py", line 965, in _exec_command
value = await tmp(*args)
File ".../pyatv/core/facade.py", line 375, in play_url
await self.relay("play_url")(url, **kwargs)
File ".../pyatv/protocols/airplay/__init__.py", line 137, in play_url
return await self._play_task
File ".../pyatv/protocols/airplay/player.py", line 68, in play_url
await self._wait_for_media_to_end()
File ".../pyatv/protocols/airplay/player.py", line 84, in _wait_for_media_to_end
resp = await self.rtsp.connection.get("/playback-info")
File ".../pyatv/support/http.py", line 422, in get
return await self.send_and_receive("GET", path, allow_error=allow_error)
File ".../pyatv/support/http.py", line 495, in send_and_receive
raise exceptions.HttpError(
pyatv.exceptions.HttpError: HTTP/1.1 method GET failed with code 500: Internal Server Error
Description
The
play_url()function fails withpyatv.exceptions.HttpErrorwhen attempting to stream video to an Apple TV 4K running tvOS 26.2. This appears to be a regression of #2512, which was originally reported for tvOS 18.0 and fixed in v0.16.1.Environment
Error
Full traceback:
Steps to Reproduce
Pair with Apple TV running tvOS 26.2:
Attempt to play any URL:
Error occurs immediately after playback attempt
Observations
atvremote scancorrectly finds the Apple TVatvremote playingreturns device state correctly_wait_for_media_to_end()when querying/playback-infoRelation to #2512
This is the same error as #2512 which was reported for tvOS 18.0. That issue was marked as completed, and v0.16.1 release notes mention "Connection issues with tvOS 18.4+" being addressed. However, tvOS 26.2 appears to have reintroduced the problem, likely due to further API changes by Apple.
Possible Cause
Apple may have changed the
/playback-infoRTSP endpoint behavior in tvOS 26.x, causing it to return HTTP 500 where it previously worked.