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

Error during setup of component cellar_tracker #4

Open
dalhoj opened this issue Jul 11, 2021 · 5 comments
Open

Error during setup of component cellar_tracker #4

dalhoj opened this issue Jul 11, 2021 · 5 comments

Comments

@dalhoj
Copy link

dalhoj commented Jul 11, 2021

Hi I got this error on HA:

Logger: homeassistant.setup
Source: custom_components/cellar_tracker/init.py:99
Integration: cellar_tracker (documentation)
First occurred: 2:43:07 PM (1 occurrences)
Last logged: 2:43:07 PM

Error during setup of component cellar_tracker
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/setup.py", line 249, in _async_setup_component
result = await task
File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/cellar_tracker/init.py", line 52, in setup
hass.data[DOMAIN].update()
File "/usr/src/homeassistant/homeassistant/util/init.py", line 280, in wrapper
result = method(args, **kwargs)
File "/config/custom_components/cellar_tracker/init.py", line 99, in update
group_data["%"] = group_data.apply( lambda x: 100
x / x.sum() )
File "/usr/local/lib/python3.9/site-packages/pandas/core/frame.py", line 3599, in setitem
self._set_item_frame_value(key, value)
File "/usr/local/lib/python3.9/site-packages/pandas/core/frame.py", line 3724, in _set_item_frame_value
raise ValueError("Columns must be same length as key")
ValueError: Columns must be same length as key

Do you know of any solution on the problem?

@jmcnatt
Copy link

jmcnatt commented Jul 16, 2021

I also received this error.
Home Assistant 2021.7.2
supervisor-2021.06.8

@thewolf-oz
Copy link

Same here:
Home Assistant 2021.8.4
supervisor-2021.06.8

Happy to assist troubleshooting as we have a fair bit in the cellar

@timcullen
Copy link

I have the same error.

Home Assistant 2021.8.7
supervisor-2021.06.8

@cheard
Copy link
Contributor

cheard commented Sep 10, 2021

As a temporary fix, I commented out line 99 in init.py. This is OBVIOUSLY not a long term solution but I dont know how to fix it myself!
# group_data["%"] = group_data.apply( lambda x: 100*x / x.sum() )
This results in all of your wines occupying 1% of your cellar, but it does restore the basic functionality. You will need to restart home assistant.
image

@cheard
Copy link
Contributor

cheard commented Sep 10, 2021

I found a temporary solution - by modifying the same row like this:
group_data["%"] = (group_data['count']/group_data['count'].sum() ) * 100

This appears to fix the issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants