RogerSelwyn / Home_Assistant_SkyQ_MediaPlayer

Home Assistant SkyQ Media player component
MIT License
105 stars 16 forks source link

[BUG] Unable to install package pyskyqremote #174

Closed asknoone closed 2 months ago

asknoone commented 2 months ago

Describe the bug

Hi Roger,

Since I upgraded to HA 2024.9.2 I have had a few integrations which have stopped working, including this one.

I am getting the error "Unable to install package pyskyqremote==0.3.26" in the logs. I tried deleting the component and integration but it's still an issue. When I try to add the integration I get the error "Config flow could not be loaded: 500 Internal Server Error Server got itself in trouble".

It would be appreciated if you could offer advice on what is wrong, thanks.

Here is the full log message:

Logger: homeassistant.util.package
Source: util/package.py:123
First occurred: 20:07:27 (3 occurrences)
Last logged: 20:07:29

Unable to install package pyskyqremote==0.3.26: ERROR: Exception: Traceback (most recent call last): File "/usr/local/lib/python3.12/site-packages/pip/_internal/cli/base_command.py", line 179, in exc_logging_wrapper status = run_func(*args) ^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/pip/_internal/cli/req_command.py", line 67, in wrapper return func(self, options, args) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/pip/_internal/commands/install.py", line 324, in run session = self.get_default_session(options) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/pip/_internal/cli/index_command.py", line 71, in get_default_session self._session = self.enter_context(self._build_session(options)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/pip/_internal/cli/index_command.py", line 100, in _build_session session = PipSession( ^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/pip/_internal/network/session.py", line 344, in __init__ self.headers["User-Agent"] = user_agent() ^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/pip/_internal/network/session.py", line 177, in user_agent setuptools_dist = get_default_environment().get_distribution("setuptools") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/pip/_internal/metadata/importlib/_envs.py", line 189, in get_distribution return next(matches, None) ^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/pip/_internal/metadata/importlib/_envs.py", line 184, in <genexpr> matches = ( ^ File "/usr/local/lib/python3.12/site-packages/pip/_internal/metadata/base.py", line 612, in iter_all_distributions for dist in self._iter_distributions(): File "/usr/local/lib/python3.12/site-packages/pip/_internal/metadata/importlib/_envs.py", line 176, in _iter_distributions yield from finder.find(location) File "/usr/local/lib/python3.12/site-packages/pip/_internal/metadata/importlib/_envs.py", line 79, in find for dist, info_location in self._find_impl(location): File "/usr/local/lib/python3.12/site-packages/pip/_internal/metadata/importlib/_envs.py", line 64, in _find_impl raw_name = get_dist_name(dist) ^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/pip/_internal/metadata/importlib/_compat.py", line 52, in get_dist_name name = cast(Any, dist).name ^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/importlib/metadata/__init__.py", line 457, in name return self.metadata['Name'] ^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/importlib/metadata/__init__.py", line 444, in metadata self.read_text('METADATA') File "/usr/local/lib/python3.12/importlib/metadata/__init__.py", line 819, in read_text return self._path.joinpath(filename).read_text(encoding='utf-8') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/pathlib.py", line 1028, in read_text return f.read() ^^^^^^^^ File "<frozen codecs>", line 322, in decode UnicodeDecodeError: 'utf-8' codec can't decode byte 0x8f in position 4576: invalid start byte

To reproduce

Well, for me it's each time Home Assistant starts and I can't use the integration so easy to reproduce for me, but as no-one else has reported it yet then perhaps not so easy to reproduce for others.

Expected bahavior

Integration works, as it used to before HA Upgrade. (I think I was on HA version core_2024.7.2 before, and now on Core 2024.9.2, Supervisor 2024.09.1, OS 13.1)

What version of SkyQ has the issue?

2.11.10

What was the last working version of Sky Q Integration?

No response

What version of Home Assistant Core has the issue?

2024.9.2

Configuration type

YAML

Configuration UI

No response

Configuration YAML

No response

Anything in the logs that might be useful for us?

See description.

Additional information

I believe I was using it in YAML previously, but after deleting everything related to the integration I can't get it to work either way, presumably because of the dependency that it's unable to load.

As I mentioned other integrations have issues after the upgrade too, so perhaps it's not the integration but not sure what else it would be. I have tried "ha core rebuild" which didn't change anything. I don't really want to resort to an old backup as I'm a bit past that in terms of other changes I've made to HA.
asknoone commented 2 months ago

I've just checked the logs for another integration not working at it has a similar issue of "not found: ['pybase64', 'py-mini-racer']". Is it possibly to do with my system getting blocked from downloading the dependencies? Where do they get downloaded from?

RogerSelwyn commented 2 months ago

It sounds like a problem with HA core, since clearly SkyQ hasn't changed. I'd roll back and look for issues on core.

RogerSelwyn commented 2 months ago

I've just checked the logs for another integration not working at it has a similar issue of "not found: ['pybase64', 'py-mini-racer']". Is it possibly to do with my system getting blocked from downloading the dependencies? Where do they get downloaded from?

They are installed via pip from pypi, not sure of the actual url. I note my environment has been upgrade to 9.2 and is working fine.

asknoone commented 2 months ago

Okay, thanks for the info.