ljmerza / ha-our-groceries

Our Groceries Integration for Home Assistant
MIT License
38 stars 8 forks source link

Error in new March beta #25

Closed bschatzow closed 2 years ago

bschatzow commented 2 years ago

Version of the custom_component

1.3.11 ## Configuration ```yaml ourgroceries: username: !secret our_groceries_username password: !secret our_groceries_password Add your logs here. ``` ## Describe the bug A clear and concise description of what the bug is. After installing the beta .3 our groceries stops running. ## Debug log

Add your logs here.
Logger: homeassistant.util.package
Source: util/package.py:99
First occurred: 7:17:29 PM (9 occurrences)
Last logged: 7:22:49 PM

Unable to install package ourgroceries==1.3.9: ERROR: Cannot install ourgroceries==1.3.9 because these package versions have conflicting dependencies. ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts

More log info Logger: homeassistant.config Source: config.py:633 First occurred: 7:45:11 PM (23 occurrences) Last logged: 7:49:07 PM

Package ourgrocery setup failed. Integration ourgroceries Requirements for ourgroceries not found: ['ourgroceries==1.3.9']. (See /config/integrations/ourgrocery.yaml:7). Package ourgrocery setup failed. Integration ourgroceries Integration 'ourgroceries' not found. (See /config/integrations/ourgrocery.yaml:7).

Jazz-ha commented 2 years ago

same problem with March official.

Unable to install package ourgroceries==1.3.9: ERROR: Cannot install ourgroceries==1.3.9 because these package versions have conflicting dependencies. ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts

Jazz-ha commented 2 years ago

I uninstalled and tried to install 1.3.11 with the same results.

Symbiot78 commented 2 years ago

same here:

Setup failed for ourgroceries: Requirements for ourgroceries not found: ['ourgroceries==1.3.9'].

bschatzow commented 2 years ago

According to HA developers the code used for our groceries no longer comply with the HA (new) requirements.

jampez77 commented 2 years ago

I'm also getting this issue since the March update.

It's also stopping me from restarting HA with the same error.

espeir commented 2 years ago

Same here:

Setup failed for ourgroceries: Requirements for ourgroceries not found: ['ourgroceries==1.3.9'].

rpitera commented 2 years ago

Get this when checking the configuration:

Integration error: ourgroceries - Requirements for ourgroceries not found: ['ourgroceries==1.3.9'].

So me too. HA 2022.03.1

andreasbrett commented 2 years ago

Same here

rpitera commented 2 years ago

Could it have anything to do with this breaking change listed in the release blog?

Integration dependencies and Python pip

In November 2020, with the release of Python pip 20.3, a new dependency resolver was introduced in pip, which is more strict.

Home Assistant held back supporting the new pip version because of the large number of dependencies we have, it took time for us to adjust to this change. Meanwhile, Python pip would only warn for conflicts.

As we have resolved almost all dependency conflicts, we have now lifted the pip version pinning, and thus now use the newer and stricter pip version.

If you use external dependencies in your custom integration, you might be impacted by the new pip resolver. Your dependencies (and their version ranges) must be compatible with the dependencies Home Assistant has; otherwise, the installation of your custom integration will not succeed.

You can find more information on the new dependency resolver in Python pip here:

https://pip.pypa.io/en/latest/user_guide/#changes-to-the-pip-dependency-resolver-in-20-3-2020

lxqikrana commented 2 years ago

I'm also seeing the error. Rolled back to 2022.02.6, hopefully the issue can be fixed soon.

nathan-curtis commented 2 years ago

Adding a mee too - almost positive it's the update to the new resolver - but I can't rollback for other reasons - Had to uninstall/disable the Ourgroceries integration to be able to restart.

Symbiot78 commented 2 years ago

@ljmerza - Any chance you can have a look at this?

ljmerza commented 2 years ago

im not sure what im supposed to do here to fix this. ourgroceries v1.3.9 exists?

andreasbrett commented 2 years ago

im not sure what im supposed to do here to fix this. ourgroceries v1.3.9 exists?

You need to make sure dependencies of the ourgrocieres pip package matches strictly with requirements of HA.

HA requires beautifulsoup 4.10.0: https://github.com/home-assistant/core/blob/9d42a425fc6d88482161d93f78c5125a3f6059eb/requirements_all.txt#L374

ourgroceries requires beautifulsoup 4.7.1: https://github.com/ljmerza/py-our-groceries/blob/1ed3fa5cd5fd999a5473af6f3e295f753aa6b38b/setup.py#L7

You would need to loosen your requirements as ourgroceries is pinned to version 4.7.1 of beautifulsoup. Here's what pypi says: https://pip.pypa.io/en/latest/topics/dependency-resolution/#possible-solutions

From the blog post of the latest HA release: https://www.home-assistant.io/blog/2022/03/02/release-20223/#updates-for-custom-integration-developers

image

rpitera commented 2 years ago

That's what I was thinking; in fact I posted the same reference a couple of days ago. 4.7.1 was released back in 2019, so we're probably overdue. Looking through the changelog, it looked like mostly bug fixes and the only major breaking change was the dropping of Python2 support.

DHandspikerWade commented 2 years ago

Created a pull request to update the dependencies. PR

In the meantime, replace the requirements in /custom_components/ourgroceries/manfest.json with the following:

"requirements": [ "git+https://github.com/DHandspikerWade/py-our-groceries.git@1.3.9.1#ourgroceries==1.3.9.1" ],

ljmerza commented 2 years ago

should be good to go on v1.3.12

espeir commented 2 years ago

Thank you!

bschatzow commented 2 years ago

Confirmed it works for me. No option for me to close this issue.

jampez77 commented 2 years ago

Ditto, works for me too

Symbiot78 commented 2 years ago

After reinstalling it I can’t seem to get it to create the sensor. I rebooted yes. I don’t see any errors and log shows it sets up the integration. Probably some dumb thing I am forgetting

bschatzow commented 2 years ago

After reinstalling it I can’t seem to get it to create the sensor. I rebooted yes. I don’t see any errors and log shows it sets up the integration. Probably some dumb thing I am forgetting Did you add the configuration in your yaml file?