Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LG webOS Smart TV component doesn't work: pylgtv package missing #16960

Closed
Vinz87 opened this issue Sep 29, 2018 · 2 comments · Fixed by #17555
Closed

LG webOS Smart TV component doesn't work: pylgtv package missing #16960

Vinz87 opened this issue Sep 29, 2018 · 2 comments · Fixed by #17555
Assignees

Comments

@Vinz87
Copy link

Vinz87 commented Sep 29, 2018

Home Assistant release with the issue:

0.77.3

Last working Home Assistant release (if known):

Operating environment (Hass.io/Docker/Windows/etc.):

Raspberry Pi Zero W, virtual environment install

Component/platform:

https://www.home-assistant.io/components/media_player.webostv/

Description of problem:
the platform webostv doesn't start because it misses the pylgtv package

Sep 29 09:47:36 raspberrypi hass[11226]: 2018-09-29 09:47:36 ERROR (Thread-5) [homeassistant.util.package] Unable to install package pylgtv==0.1.7: Exception:
Sep 29 09:47:36 raspberrypi hass[11226]: Traceback (most recent call last):
Sep 29 09:47:36 raspberrypi hass[11226]:   File "/usr/lib/python3.5/shutil.py", line 544, in move
Sep 29 09:47:36 raspberrypi hass[11226]:     os.rename(src, real_dst)
Sep 29 09:47:36 raspberrypi hass[11226]: PermissionError: [Errno 13] Permission denied: '/srv/homeassistant/lib/python3.5/site-packages/pylgtv-0.1.9.dist-info/INSTALLER' -> '/tmp/pip-9lrsjmlf-uninstall/srv/homeassistant/lib/python3.5/site-packages/pylgtv-0.1.9.dist-info/INSTALLER'
Sep 29 09:47:36 raspberrypi hass[11226]: During handling of the above exception, another exception occurred:
Sep 29 09:47:36 raspberrypi hass[11226]: Traceback (most recent call last):
Sep 29 09:47:36 raspberrypi hass[11226]:   File "/srv/homeassistant/lib/python3.5/site-packages/pip/basecommand.py", line 215, in main
Sep 29 09:47:36 raspberrypi hass[11226]:     status = self.run(options, args)
Sep 29 09:47:36 raspberrypi hass[11226]:   File "/srv/homeassistant/lib/python3.5/site-packages/pip/commands/install.py", line 360, in run
Sep 29 09:47:36 raspberrypi hass[11226]:     prefix=options.prefix_path,
Sep 29 09:47:36 raspberrypi hass[11226]:   File "/srv/homeassistant/lib/python3.5/site-packages/pip/req/req_set.py", line 778, in install
Sep 29 09:47:36 raspberrypi hass[11226]:     requirement.uninstall(auto_confirm=True)
Sep 29 09:47:36 raspberrypi hass[11226]:   File "/srv/homeassistant/lib/python3.5/site-packages/pip/req/req_install.py", line 754, in uninstall
Sep 29 09:47:36 raspberrypi hass[11226]:     paths_to_remove.remove(auto_confirm)
Sep 29 09:47:36 raspberrypi hass[11226]:   File "/srv/homeassistant/lib/python3.5/site-packages/pip/req/req_uninstall.py", line 115, in remove
Sep 29 09:47:36 raspberrypi hass[11226]:     renames(path, new_path)
Sep 29 09:47:36 raspberrypi hass[11226]:   File "/srv/homeassistant/lib/python3.5/site-packages/pip/utils/__init__.py", line 267, in renames
Sep 29 09:47:36 raspberrypi hass[11226]:     shutil.move(old, new)
Sep 29 09:47:36 raspberrypi hass[11226]:   File "/usr/lib/python3.5/shutil.py", line 559, in move
Sep 29 09:47:36 raspberrypi hass[11226]:     os.unlink(src)
Sep 29 09:47:36 raspberrypi hass[11226]: PermissionError: [Errno 13] Permission denied: '/srv/homeassistant/lib/python3.5/site-packages/pylgtv-0.1.9.dist-info/INSTALLER'
Sep 29 09:47:36 raspberrypi hass[11226]: 2018-09-29 09:47:36 ERROR (MainThread) [homeassistant.requirements] Not initializing notify.webostv because could not install requirement pylgtv==0.1.7
Sep 29 09:47:36 raspberrypi hass[11226]: 2018-09-29 09:47:36 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform notify.webostv: Could not install all requirements.

Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):

notify:
  - platform: webostv
    host: 192.168.1.46
    name: livingroom_tv

Traceback (if applicable):


Additional information:
I tried to install the pylgtv package (as I had to do with the RPi.GPIO package for a similar problem) with following commands:

sudo su -s /bin/bash homeassistant
source /srv/homeassistant/bin/activate
pip3 install pylgtv

and also

pip install pylgtv

and I get these results:

Requirement already satisfied: pylgtv in /srv/homeassistant/lib/python3.5/site-packages
Requirement already satisfied: websockets in /srv/homeassistant/lib/python3.5/site-packages (from pylgtv)
Requirement already satisfied: asyncio in /srv/homeassistant/lib/python3.5/site-packages (from pylgtv)

after a reboot the problem persists.

@timmo001
Copy link
Contributor

timmo001 commented Oct 1, 2018

Try uninstalling pylgtv from everywhere possible, including with sudo. python3.5 seems to be the culprit.

python3.5 -m pip uninstall pylgtv

It looks to me like the package is installed or trying to be updated, but pip does not have access.

Also, you don't have to install the package manually as home assistant does this for you if I recall correctly

@Vinz87
Copy link
Author

Vinz87 commented Oct 6, 2018

I solved in this way:

source /srv/homeassistant/bin/activate
pip3 uninstall pylgtv
pip3 install https://files.pythonhosted.org/packages/82/87/11c9028609388f3197233872c3b61b97dc8aa62de49c5131d47bb00716f2/pylgtv-0.1.7.tar.gz

So, the problem is that Home Assistant automatically install pylgtv 0.1.9, while the webostv component requires pylgtv 0.1.7.

I think this should be taken into account as a bug.

eavanvalkenburg added a commit to eavanvalkenburg/home-assistant that referenced this issue Oct 17, 2018
eavanvalkenburg added a commit to eavanvalkenburg/home-assistant that referenced this issue Oct 17, 2018
@ghost ghost added the in progress label Oct 17, 2018
@ghost ghost removed the in progress label Oct 17, 2018
fabaff pushed a commit that referenced this issue Oct 17, 2018
@balloob balloob mentioned this issue Oct 26, 2018
@ghost ghost assigned balloob Oct 26, 2018
@home-assistant home-assistant locked and limited conversation to collaborators Feb 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants