Chromecast could not install

I received this error message when putting

  • media_player: cast

what to do?

Thanks

Exception:
Traceback (most recent call last):
File “C:\Users\admin\AppData\Local\Programs\Python\Python35\lib\site-packages\pip\basecommand.py”, line 209, in main
status = self.run(options, args)
File “C:\Users\admin\AppData\Local\Programs\Python\Python35\lib\site-packages\pip\commands\install.py”, line 379, in run
os.remove(target_item_dir)
PermissionError: [WinError 5] Access is denied: ‘C:\Users\admin\AppData\Roaming\.homeassistant\deps\netifaces.cp35-win_amd64.pyd’
ERROR:homeassistant.bootstrap:Not initializing media_player.cast because could not install dependency pychromecast==0.7.6

I managed (not sure how) to get rid of the error. But the CAST is not seen … any suggestions? (No errors in log file)

I’d start with that permissions error. Looks like someone discussed a similar issue here:

Now I receive this error …

16-11-21 08:58:18 homeassistant.components.media_player: Error while setting up platform cast
Traceback (most recent call last):
File “C:\Users\admin\AppData\Local\Programs\Python\Python35\lib\site-packages\homeassistant\helpers\entity_component.py”, line 150, in _async_setup_platform
entity_platform.add_entities, discovery_info
File “C:\Users\admin\AppData\Local\Programs\Python\Python35\lib\asyncio\futures.py”, line 361, in iter
yield self # This tells Task to wait for completion.
File “C:\Users\admin\AppData\Local\Programs\Python\Python35\lib\asyncio\tasks.py”, line 296, in _wakeup
future.result()
File “C:\Users\admin\AppData\Local\Programs\Python\Python35\lib\asyncio\futures.py”, line 274, in result
raise self.exception
File “C:\Users\admin\AppData\Local\Programs\Python\Python35\lib\concurrent\futures\thread.py”, line 55, in run
result = self.fn(*self.args, **self.kwargs)
File “C:\Users\admin\AppData\Local\Programs\Python\Python35\lib\site-packages\homeassistant\components\media_player\cast.py”, line 45, in setup_platform
import pychromecast
File "C:\Users\admin\AppData\Roaming.homeassistant\deps\pychromecast_init
.py", line 14, in
from . import socket_client
File “C:\Users\admin\AppData\Roaming.homeassistant\deps\pychromecast\socket_client.py”, line 22, in
from . import cast_channel_pb2
File “C:\Users\admin\AppData\Roaming.homeassistant\deps\pychromecast\cast_channel_pb2.py”, line 6, in
from google.protobuf.internal import enum_type_wrapper
ImportError: No module named ‘google.protobuf’

Thanks, those errors went away. Now I have this, not sure if it-s related to Google Cast (which is still not appearing)

16-11-21 14:58:40 oauth2client.contrib.locked_file: Could not acquire lock C:\Users\admin\AppData\Local\Temp\google-api-python-client-discovery-doc.cache.lock in 0 seconds
16-11-21 14:58:40 oauth2client.contrib.locked_file: Could not acquire lock C:\Users\admin\AppData\Local\Temp\google-api-python-client-discovery-doc.cache.lock in 0 seconds
16-11-21 14:58:40 oauth2client.contrib.locked_file: Could not acquire lock C:\Users\admin\AppData\Local\Temp\google-api-python-client-discovery-doc.cache.lock in 0 seconds
16-11-21 14:58:40 oauth2client.contrib.locked_file: Could not acquire lock C:\Users\admin\AppData\Local\Temp\google-api-python-client-discovery-doc.cache.lock in 0 seconds
16-11-21 14:58:40 oauth2client.contrib.locked_file: Could not acquire lock C:\Users\admin\AppData\Local\Temp\google-api-python-client-discovery-doc.cache.lock in 0 seconds
16-11-21 14:58:40 oauth2client.contrib.locked_file: Could not acquire lock C:\Users\admin\AppData\Local\Temp\google-api-python-client-discovery-doc.cache.lock in 0 seconds

This isn’t the way to define a media player. You want:

media_player:
  - platform: cast

Yes, I changed that already (I wrote it wrongly in first post). My configuration is below (and still the problem):

# Example configuration.yaml entry
media_player:
  - platform: yamaha
    host: 192.168.1.32
    source_ignore:
      - "AV1"
      - "AV2"
      - "AV3"
      - "AV4"
      - "AV5"
      - "AV6"
      - "HDMI2"
      - "HDMI5"  
    source_names:
      HDMI1: "XBOX"
      HDMI3: "NUC"
      HDMI4: "BR"
  - platform: cast
    host: 192.168.1.35
  - platform: plex

That error you gave is unrelated to your media setup. I’d recommend adding one thing at a time and making sure it works before moving on.

Looks like you’ve got an oAuth problem. Are you using the Fitbit component? Or the new Google calendar component?

I wouldn’t be surprised if you still have permissions issues.

I use both, but both are working correctly.

And I used the Yamaha first and the cast later. But now I have problem with both … who knows what is happening

I took out the YAMAHA and the CAST, and all errors went away. Now I put Yamaha back (CAST not yet) and I receive this: (yesterday, everything was working fine)

16-11-21 17:52:47 homeassistant.components.media_player: Error while setting up platform yamaha
Traceback (most recent call last):
File “C:\Users\admin\AppData\Local\Programs\Python\Python35\lib\site-packages\homeassistant\helpers\entity_component.py”, line 150, in _async_setup_platform
entity_platform.add_entities, discovery_info
File “C:\Users\admin\AppData\Local\Programs\Python\Python35\lib\asyncio\futures.py”, line 361, in iter
yield self # This tells Task to wait for completion.
File “C:\Users\admin\AppData\Local\Programs\Python\Python35\lib\asyncio\tasks.py”, line 296, in _wakeup
future.result()
File “C:\Users\admin\AppData\Local\Programs\Python\Python35\lib\asyncio\futures.py”, line 274, in result
raise self._exception
File “C:\Users\admin\AppData\Local\Programs\Python\Python35\lib\concurrent\futures\thread.py”, line 55, in run
result = self.fn(*self.args, **self.kwargs)
File “C:\Users\admin\AppData\Local\Programs\Python\Python35\lib\site-packages\homeassistant\components\media_player\yamaha.py”, line 89, in setup_platform
YamahaDevice(name, receiver, source_ignore, source_names)])
File “C:\Users\admin\AppData\Local\Programs\Python\Python35\lib\site-packages\homeassistant\components\media_player\yamaha.py”, line 108, in init
self.update()
File “C:\Users\admin\AppData\Local\Programs\Python\Python35\lib\site-packages\homeassistant\components\media_player\yamaha.py”, line 114, in update
self._play_status = self._receiver.play_status()
File “C:\Users\admin\AppData\Roaming.homeassistant\deps\rxv\rxv.py”, line 336, in play_status
playing = (res.find(".//Playback_Info").text == “Play”)
AttributeError: ‘NoneType’ object has no attribute ‘text’
16-11-21 17:52:48 oauth2client.contrib.locked_file: Could not acquire lock C:\Users\admin\AppData\Local\Temp\google-api-python-client-discovery-doc.cache.lock in 0 seconds
16-11-21 17:52:48 oauth2client.contrib.locked_file: Could not acquire lock C:\Users\admin\AppData\Local\Temp\google-api-python-client-discovery-doc.cache.lock in 0 seconds
16-11-21 17:52:48 oauth2client.contrib.locked_file: Could not acquire lock C:\Users\admin\AppData\Local\Temp\google-api-python-client-discovery-doc.cache.lock in 0 seconds
16-11-21 17:52:48 oauth2client.contrib.locked_file: Could not acquire lock C:\Users\admin\AppData\Local\Temp\google-api-python-client-discovery-doc.cache.lock in 0 seconds
16-11-21 17:52:48 oauth2client.contrib.locked_file: Could not acquire lock C:\Users\admin\AppData\Local\Temp\google-api-python-client-discovery-doc.cache.lock in 0 seconds
16-11-21 17:52:48 oauth2client.contrib.locked_file: Could not acquire lock C:\Users\admin\AppData\Local\Temp\google-api-python-client-discovery-doc.cache.lock in 0 seconds

what is the best strategy to fix the above?

EDIT, maybe restart from scratch, deinstall all and restart from scratch?