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.

Playing media with enqueue set to True is deprecated. Use 'add' instead

See original GitHub issue

Experiencing some spontaneous restarts, not sure, but happened after clicking Play on a Spotify album in Music Assistant. please have a look if this is Mass? or HA…

HA 2022.7.0.dev20220531

2022-05-31 13:38:00 ERROR (MainThread) [homeassistant.core] Error executing service: <ServiceCall media_player.play_media (c:01G4CYGSYZJPGZXXW73QB2FYAP): entity_id=['media_player.googlehome_library'], extra=enqueue=True, media_type=music, media_id=http://192.168.1.71:8095/media_player.googlehome_library.flac, enqueue=add>
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/core.py", line 1724, in catch_exceptions
    await coro_or_task
  File "/usr/src/homeassistant/homeassistant/core.py", line 1743, in _execute_service
    await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 204, in handle_service
    await service.entity_service_call(
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 680, in entity_service_call
    future.result()  # pop exception if have
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 964, in async_request_call
    await coro
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 717, in _handle_entity_call
    await result
  File "/usr/src/homeassistant/homeassistant/components/cast/media_player.py", line 717, in async_play_media
    await self.hass.async_add_executor_job(
  File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.9/site-packages/pychromecast/quick_play.py", line 77, in quick_play
    controller.quick_play(**data)
  File "/usr/local/lib/python3.9/site-packages/pychromecast/controllers/media.py", line 544, in quick_play
    raise PyChromecastError()
pychromecast.error.PyChromecastError
2022-05-31 13:38:00 ERROR (MainThread) [homeassistant.core] Error executing service: <ServiceCall media_player.play_media (c:01G4CYGT288NBWWASWVVH4KEJ7): entity_id=['media_player.googlehome_library'], extra=enqueue=True, media_type=music, media_id=http://192.168.1.71:8095/media_player.googlehome_library.flac, enqueue=add>
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/core.py", line 1724, in catch_exceptions
    await coro_or_task
  File "/usr/src/homeassistant/homeassistant/core.py", line 1743, in _execute_service
    await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 204, in handle_service
    await service.entity_service_call(
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 680, in entity_service_call
    future.result()  # pop exception if have
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 964, in async_request_call
    await coro
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 717, in _handle_entity_call
    await result
  File "/usr/src/homeassistant/homeassistant/components/cast/media_player.py", line 717, in async_play_media
    await self.hass.async_add_executor_job(
  File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.9/site-packages/pychromecast/quick_play.py", line 77, in quick_play
    controller.quick_play(**data)
  File "/usr/local/lib/python3.9/site-packages/pychromecast/controllers/media.py", line 544, in quick_play
    raise PyChromecastError()
pychromecast.error.PyChromecastError
2022-05-31 13:38:00 ERROR (MainThread) [homeassistant.core] Error executing service: <ServiceCall media_player.play_media (c:01G4CYGT5EABJEHENV8TZEKNX7): entity_id=['media_player.googlehome_library'], extra=enqueue=True, media_type=music, media_id=http://192.168.1.71:8095/media_player.googlehome_library.flac, enqueue=add>
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/core.py", line 1724, in catch_exceptions
    await coro_or_task
  File "/usr/src/homeassistant/homeassistant/core.py", line 1743, in _execute_service
    await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 204, in handle_service
    await service.entity_service_call(
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 680, in entity_service_call
    future.result()  # pop exception if have
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 964, in async_request_call
    await coro
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 717, in _handle_entity_call
    await result
  File "/usr/src/homeassistant/homeassistant/components/cast/media_player.py", line 717, in async_play_media
    await self.hass.async_add_executor_job(
  File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.9/site-packages/pychromecast/quick_play.py", line 77, in quick_play
    controller.quick_play(**data)
  File "/usr/local/lib/python3.9/site-packages/pychromecast/controllers/media.py", line 544, in quick_play
    raise PyChromecastError()
pychromecast.error.PyChromecastError
2022-05-31 13:38:00 ERROR (MainThread) [homeassistant.core] Error executing service: <ServiceCall media_player.play_media (c:01G4CYGT8NMC639PQSYNPRFAKG): entity_id=['media_player.googlehome_library'], extra=enqueue=True, media_type=music, media_id=http://192.168.1.71:8095/media_player.googlehome_library.flac, enqueue=add>
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/core.py", line 1724, in catch_exceptions
    await coro_or_task
  File "/usr/src/homeassistant/homeassistant/core.py", line 1743, in _execute_service
    await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 204, in handle_service
    await service.entity_service_call(
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 680, in entity_service_call
    future.result()  # pop exception if have
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 964, in async_request_call
    await coro
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 717, in _handle_entity_call
    await result
  File "/usr/src/homeassistant/homeassistant/components/cast/media_player.py", line 717, in async_play_media
    await self.hass.async_add_executor_job(
  File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.9/site-packages/pychromecast/quick_play.py", line 77, in quick_play
    controller.quick_play(**data)
  File "/usr/local/lib/python3.9/site-packages/pychromecast/controllers/media.py", line 544, in quick_play
    raise PyChromecastError()
pychromecast.error.PyChromecastError
2022-05-31 13:38:07 WARNING (MainThread) [homeassistant.components.media_player] Playing media with enqueue set to True is deprecated. Use 'add' instead
2022-05-31 13:38:07 WARNING (MainThread) [homeassistant.components.media_player] Playing media with enqueue set to True is deprecated. Use 'add' instead

[snip]

2022-05-31 13:38:20 WARNING (MainThread) [homeassistant.components.media_player] Playing media with enqueue set to True is deprecated. Use 'add' instead
2022-05-31 13:38:20 WARNING (MainThread) [homeassistant.components.media_player] Playing media with enqueue set to True is deprecated. Use 'add' instead
2022-05-31 13:38:20 ERROR (Thread-8) [pychromecast.socket_client] [Library(192.168.1.47):8009] Unhandled exception in worker thread, attempting reconnect
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/pychromecast/socket_client.py", line 538, in run
    if self.run_once(timeout=POLL_TIME_BLOCKING) == 1:
  File "/usr/local/lib/python3.9/site-packages/pychromecast/socket_client.py", line 632, in run_once
    self._route_message(message, data)
  File "/usr/local/lib/python3.9/site-packages/pychromecast/socket_client.py", line 712, in _route_message
    for handler in self._handlers[message.namespace]:
RuntimeError: Set changed size during iteration
2022-05-31 13:38:20 WARNING (Thread-8) [pychromecast.socket_client] [Library(192.168.1.47):8009] Error communicating with socket, resetting connection

[snip]

2022-05-31 13:38:21 WARNING (Thread-8) [pychromecast.socket_client] [Library(192.168.1.47):8009] Error communicating with socket, resetting connection

and again after restart:

Schermafbeelding 2022-05-31 om 13 47 00

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
marcelveldtcommented, May 31, 2022

haha, yes too hasty… I needed to do another patch release for the 2022.5 compatible version. I’m now working on all changes for 2022.6 compatibility

1reaction
marcelveldtcommented, May 31, 2022

HA core has been adjusted to better support MA, specially the queue options. You are already running the HA beta with these changes merged while I did not launch a MA beta with these changes present. I will do so later today.

Read more comments on GitHub >

github_iconTop Results From Across the Web

pychromecast/media.py at master · home-assistant-libs ...
Provides a controller for controlling the default media players. on the Chromecast. ... enqueue: bool - if True, enqueue the media instead of...
Read more >
InCallService - Android Developers
This constant was deprecated in API level 33. Use STOP_FOREGROUND_DETACH instead. The legacy behavior was inconsistent, leading to bugs around unpredictable ...
Read more >
GPT Reference - Publisher Tag - Google Developers
Constructs an ad slot with a given ad unit path and size and associates it with the ID of a div element on...
Read more >
AudioPlayer Interface Reference | Alexa Skills Kit
Use the AudioPlayer interface for streaming audio and monitoring playback progression in your Alexa skill.
Read more >
Migrate from Flex UI 1.x.x to 2.x.x | Twilio
Learn how to migrate your Twilio Flex account from UI version 1.x.x to UI version 2.x.x and what changes you may need to...
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