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

Fed Ex sensor broken #12990

Closed
edif30 opened this issue Mar 8, 2018 · 9 comments
Closed

Fed Ex sensor broken #12990

edif30 opened this issue Mar 8, 2018 · 9 comments

Comments

@edif30
Copy link
Contributor

edif30 commented Mar 8, 2018

Make sure you are running the latest version of Home Assistant before reporting an issue.

You should only file an issue if you found a bug. Feature and enhancement requests should go in the Feature Requests section of our community forum:

**Home Assistant release (hass --version): 0.64.3

Python release (python3 --version): 3.6.3+

Component/platform: FedEx Sensor

Description of problem:
Cannot log in. I can on the site just fine. Just not with HA

Expected:
To log in

Problem-relevant configuration.yaml entries and steps to reproduce:

Add FedEx Sensor
Restart HA
Remove FedEx Sensor
Re-add
Same thing

I also tried this on two different hosts.  One on an rpi2 and another in a docker container.

Traceback (if applicable):

Traceback (most recent call last):
  File "/srv/homeassistant/homeassistant_venv/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py", line 197, in _async_add_entity
    yield from entity.async_device_update(warning=False)
  File "/srv/homeassistant/homeassistant_venv/lib/python3.6/site-packages/homeassistant/helpers/entity.py", line 327, in async_device_update
    yield from self.hass.async_add_job(self.update)
  File "/usr/local/lib/python3.6/asyncio/futures.py", line 332, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/local/lib/python3.6/asyncio/tasks.py", line 250, in _wakeup
    future.result()
  File "/usr/local/lib/python3.6/asyncio/futures.py", line 245, in result
    raise self._exception
  File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/srv/homeassistant/homeassistant_venv/lib/python3.6/site-packages/homeassistant/util/__init__.py", line 308, in wrapper
    result = method(*args, **kwargs)
  File "/srv/homeassistant/homeassistant_venv/lib/python3.6/site-packages/homeassistant/components/sensor/fedex.py", line 94, in _update
    for package in fedexdeliverymanager.get_packages(self._session):
  File "/srv/homeassistant/homeassistant_venv/lib/python3.6/site-packages/fedexdeliverymanager/__init__.py", line 66, in wrapped
    _login(*args)
  File "/srv/homeassistant/homeassistant_venv/lib/python3.6/site-packages/fedexdeliverymanager/__init__.py", line 82, in _login
    raise FedexError('could not login')
fedexdeliverymanager.FedexError: could not login

Additional info:
Was working fine about 15 hours ago.

@dshokouhi
Copy link
Member

I think this error shows up when you are being limited by fedex, I wouldnt be surprised if it goes away in a couple hours. My fedex sensor works fine but sometimes i see an error.

@happyleavesaoc
Copy link
Contributor

I get this occasionally as well. We need to increase the interval I think.

@edif30
Copy link
Contributor Author

edif30 commented Mar 10, 2018

I turned the sensor off for 2 days and just re-enabled. It still fails with the same error. So I don't think its a case of being limited by calls to their service. I tried also deleting the .pickle file and restarting and that didn't do it either. I'm now on 0.65.1. Will try 0.65.2 once the docker file finishes building.

@Coolie1101
Copy link

Error still persist in 0.65.3, even after being disabled for a week.

2018-03-12 10:37:23 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up platform fedex
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity_platform.py", line 82, in async_setup
    SLOW_SETUP_MAX_WAIT, loop=hass.loop)
  File "/usr/lib/python3.5/asyncio/tasks.py", line 400, in wait_for
    return fut.result()
  File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result
    raise self._exception
  File "/usr/lib/python3.5/concurrent/futures/thread.py", line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/sensor/fedex.py", line 56, in setup_platform
    cookie_path=cookie)
  File "/srv/homeassistant/lib/python3.5/site-packages/fedexdeliverymanager/__init__.py", line 148, in get_session
    _login(session)
  File "/srv/homeassistant/lib/python3.5/site-packages/fedexdeliverymanager/__init__.py", line 83, in _login
    data = resp.json()
  File "/srv/homeassistant/lib/python3.5/site-packages/requests/models.py", line 892, in json
    return complexjson.loads(self.text, **kwargs)
  File "/usr/lib/python3.5/json/__init__.py", line 319, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.5/json/decoder.py", line 339, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.5/json/decoder.py", line 357, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 4 column 1 (char 4)

@dshokouhi
Copy link
Member

Thats a completely different error than the original bug.

@Coolie1101
Copy link

Coolie1101 commented Mar 12, 2018

@dshokouhi Should it be posted as a new issue?

@dshokouhi
Copy link
Member

@Coolie1101 definitely

@Coolie1101
Copy link

Sure thing.

@edif30
Copy link
Contributor Author

edif30 commented Mar 24, 2018

Closing as a new issue is present.

#13131

@edif30 edif30 closed this as completed Mar 24, 2018
@home-assistant home-assistant locked and limited conversation to collaborators Jul 26, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants