Closed cithraul closed 3 years ago
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.
This issue still exists as of 2021.11 docker install.
FWIW - I see a EOF error in spawn, rather than the TIMEOUT error logged by cithraul. As if pianobar is exiting abnormally. It does start apparently. I can confirm as well that pianobar runs fine from the command line.
2021-11-27 11:25:26 INFO (SyncWorker_8) [homeassistant.components.pandora.media_player] Started pianobar subprocess
2021-11-27 11:25:27 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140410749214000] End Of File (EOF). Exception style platform.
<pexpect.pty_spawn.spawn object at 0x7fb3ee0a7ee0>
command: /usr/bin/pianobar
args: ['/usr/bin/pianobar']
buffer (last 100 chars): b''
before (last 100 chars): b'Welcome to pianobar (2020.11.28)! Press ? for a list of commands.\r\n\x1b[2K(i) Login... '
after: <class 'pexpect.exceptions.EOF'>
match: None
match_index: None
exitstatus: None
flag_eof: True
pid: 6611
child_fd: 41
closed: False
timeout: 5
delimiter: <class 'pexpect.exceptions.EOF'>
logfile: None
logfile_read: None
logfile_send: None
maxread: 10000
ignorecase: False
searchwindowsize: None
delaybeforesend: 0.05
delayafterclose: 0.1
delayafterterminate: 0.1
searcher: searcher_re:
0: re.compile(b'Receiving new playlist')
1: re.compile(b'Select station:')
2: re.compile(b'Email:')
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/pexpect/spawnbase.py", line 166, in read_nonblocking
s = os.read(self.child_fd, size)
OSError: [Errno 5] I/O error
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/pexpect/expect.py", line 111, in expect_loop
incoming = spawn.read_nonblocking(spawn.maxread, timeout)
File "/usr/local/lib/python3.9/site-packages/pexpect/pty_spawn.py", line 485, in read_nonblocking
return super(spawn, self).read_nonblocking(size)
File "/usr/local/lib/python3.9/site-packages/pexpect/spawnbase.py", line 171, in read_nonblocking
raise EOF('End Of File (EOF). Exception style platform.')
pexpect.exceptions.EOF: End Of File (EOF). Exception style platform.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 185, in handle_call_service
await hass.services.async_call(
File "/usr/src/homeassistant/homeassistant/core.py", line 1495, in async_call
task.result()
File "/usr/src/homeassistant/homeassistant/core.py", line 1530, in _execute_service
await handler.job.target(service_call)
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 213, in handle_service
await self.hass.helpers.service.entity_service_call(
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 667, in entity_service_call
future.result() # pop exception if have
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 863, in async_request_call
await coro
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 704, in _handle_entity_call
await result
File "/usr/src/homeassistant/homeassistant/components/media_player/__init__.py", line 614, in async_turn_on
await self.hass.async_add_executor_job(self.turn_on)
File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/homeassistant/homeassistant/components/pandora/media_player.py", line 107, in turn_on
mode = self._pianobar.expect(
File "/usr/local/lib/python3.9/site-packages/pexpect/spawnbase.py", line 340, in expect
return self.expect_list(compiled_pattern_list,
File "/usr/local/lib/python3.9/site-packages/pexpect/spawnbase.py", line 369, in expect_list
return exp.expect_loop(timeout)
File "/usr/local/lib/python3.9/site-packages/pexpect/expect.py", line 117, in expect_loop
return self.eof(e)
File "/usr/local/lib/python3.9/site-packages/pexpect/expect.py", line 63, in eof
raise EOF(msg)
pexpect.exceptions.EOF: End Of File (EOF). Exception style platform.
<pexpect.pty_spawn.spawn object at 0x7fb3ee0a7ee0>
command: /usr/bin/pianobar
args: ['/usr/bin/pianobar']
buffer (last 100 chars): b''
before (last 100 chars): b'Welcome to pianobar (2020.11.28)! Press ? for a list of commands.\r\n\x1b[2K(i) Login... '
after: <class 'pexpect.exceptions.EOF'>
match: None
match_index: None
exitstatus: None
flag_eof: True
pid: 6611
child_fd: 41
closed: False
timeout: 5
delimiter: <class 'pexpect.exceptions.EOF'>
logfile: None
logfile_read: None
logfile_send: None
maxread: 10000
ignorecase: False
searchwindowsize: None
delaybeforesend: 0.05
delayafterclose: 0.1
delayafterterminate: 0.1
searcher: searcher_re:
0: re.compile(b'Receiving new playlist')
1: re.compile(b'Select station:')
2: re.compile(b'Email:')
Also seeing this (as well as a few others https://community.home-assistant.io/t/pianobar-configuration-in-docker/159111/19) I wonder if we need a new issue since this is closed?
Yep, this issue is back in 2021.11. It was working in 2021.1 though. Getting the EOF error as well this time around.
Still present in 2021.12.2 :
Logger: homeassistant.components.websocket_api.http.connection Source: components/pandora/media_player.py:107 Integration: Home Assistant WebSocket API (documentation, issues) First occurred: 5:52:13 PM (1 occurrences) Last logged: 5:52:13 PM
[140128491580912] End Of File (EOF). Exception style platform. <pexpect.pty_spawn.spawn object at 0x7f7217edf880> command: /usr/bin/pianobar args: ['/usr/bin/pianobar'] buffer (last 100 chars): b'' before (last 100 chars): b'Welcome to pianobar (2020.11.28)! Press ? for a list of commands.\r\n\x1b[2K(i) Login... ' after: <class 'pexpect.exceptions.EOF'> match: None match_index: None exitstatus: None flag_eof: True pid: 5109 child_fd: 64 closed: False timeout: 30 delimiter: <class 'pexpect.exceptions.EOF'> logfile: None logfile_read: None logfile_send: None maxread: 2000 ignorecase: False searchwindowsize: None delaybeforesend: 0.05 delayafterclose: 0.1 delayafterterminate: 0.1 searcher: searcher_re: 0: re.compile(b'Receiving new playlist') 1: re.compile(b'Select station:') 2: re.compile(b'Email:') Traceback (most recent call last): File "/usr/local/lib/python3.9/site-packages/pexpect/spawnbase.py", line 166, in read_nonblocking s = os.read(self.child_fd, size) OSError: [Errno 5] I/O error
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/usr/local/lib/python3.9/site-packages/pexpect/expect.py", line 111, in expect_loop incoming = spawn.read_nonblocking(spawn.maxread, timeout) File "/usr/local/lib/python3.9/site-packages/pexpect/pty_spawn.py", line 485, in read_nonblocking return super(spawn, self).read_nonblocking(size) File "/usr/local/lib/python3.9/site-packages/pexpect/spawnbase.py", line 171, in read_nonblocking raise EOF('End Of File (EOF). Exception style platform.') pexpect.exceptions.EOF: End Of File (EOF). Exception style platform.
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 185, in handle_call_service await hass.services.async_call( File "/usr/src/homeassistant/homeassistant/core.py", line 1495, in async_call task.result() File "/usr/src/homeassistant/homeassistant/core.py", line 1530, in _execute_service await handler.job.target(service_call) File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 209, in handle_service await self.hass.helpers.service.entity_service_call( File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 663, in entity_service_call future.result() # pop exception if have File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 896, in async_request_call await coro File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 700, in _handle_entity_call await result File "/usr/src/homeassistant/homeassistant/components/media_player/init.py", line 638, in async_turn_on await self.hass.async_add_executor_job(self.turn_on) File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run result = self.fn(*self.args, **self.kwargs) File "/usr/src/homeassistant/homeassistant/components/pandora/media_player.py", line 107, in turn_on mode = self._pianobar.expect( File "/usr/local/lib/python3.9/site-packages/pexpect/spawnbase.py", line 340, in expect return self.expect_list(compiled_pattern_list, File "/usr/local/lib/python3.9/site-packages/pexpect/spawnbase.py", line 369, in expect_list return exp.expect_loop(timeout) File "/usr/local/lib/python3.9/site-packages/pexpect/expect.py", line 117, in expect_loop return self.eof(e) File "/usr/local/lib/python3.9/site-packages/pexpect/expect.py", line 63, in eof raise EOF(msg) pexpect.exceptions.EOF: End Of File (EOF). Exception style platform. <pexpect.pty_spawn.spawn object at 0x7f7217edf880> command: /usr/bin/pianobar args: ['/usr/bin/pianobar'] buffer (last 100 chars): b'' before (last 100 chars): b'Welcome to pianobar (2020.11.28)! Press ? for a list of commands.\r\n\x1b[2K(i) Login... ' after: <class 'pexpect.exceptions.EOF'> match: None match_index: None exitstatus: None flag_eof: True pid: 5109 child_fd: 64 closed: False timeout: 30 delimiter: <class 'pexpect.exceptions.EOF'> logfile: None logfile_read: None logfile_send: None maxread: 2000 ignorecase: False searchwindowsize: None delaybeforesend: 0.05 delayafterclose: 0.1 delayafterterminate: 0.1 searcher: searcher_re: 0: re.compile(b'Receiving new playlist') 1: re.compile(b'Select station:') 2: re.compile(b'Email:')
I noticed that too- opened a new issue here: https://github.com/home-assistant/core/issues/62156.
Has anyone had any luck with this? Im running into this issue as well running the latest homeassistant docker container. have the config files in the correct location and can auto login with pianobar via docker exec.
issue still present
Welcome to pianobar (2020.11.28)! Press ? for a list of commands.\r\n\x1b[2K(i) Login...
If pianobar is offering the login screen, it won't ever get to playing, and thus will time out, so maybe you didn't define your credentials?
The problem
Added pandora integration. When trying to turn on the mediaplayer, the following error occurs in the log file: The container is set to run privileged. Running pianobar directly from the docker container (root user) works without issues.
2020-07-21 18:47:24 ERROR (MainThread) [homeassistant.core] Error executing service: <ServiceCall media_player.turn_on (c:af0137ae93e34564ad158e264f681986): entity_id=['media_player.pandora']>
(Complete error trace below)
Environment
Problem-relevant
configuration.yaml
Traceback/Error logs
Additional information