Fedex: Error on device update!

My SD card died and i have to rebuild everything. At this time i have two problems only. My FedEx is not working and USPS. I will open another ticket for USPS, but hope that someone could help me with FedEx here.

I added FedEx component:

      - platform: fedex
        username: !secret fedex_username
        password: !secret fedex_password

Every time when I reboot my RPi, I have to following:

    fedex: Error on device update!

Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.5/site-packages/fedexdeliverymanager/__init__.py", line 62, in wrapped
    return function(*args)
  File "/srv/homeassistant/lib/python3.5/site-packages/fedexdeliverymanager/__init__.py", line 102, in get_packages
    raise FedexError(err)
fedexdeliverymanager.FedexError: failed to get shipment list: Relogin

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity_platform.py", line 197, in _async_add_entity
    yield from entity.async_device_update(warning=False)
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity.py", line 324, in async_device_update
    yield from self.hass.async_add_job(self.update)
  File "/usr/lib/python3.5/asyncio/futures.py", line 380, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.5/asyncio/tasks.py", line 304, in _wakeup
    future.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/util/__init__.py", line 306, in wrapper
    result = method(*args, **kwargs)
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/sensor/fedex.py", line 94, in _update
    for package in fedexdeliverymanager.get_packages(self._session):
  File "/srv/homeassistant/lib/python3.5/site-packages/fedexdeliverymanager/__init__.py", line 65, in wrapped
    return function(*args)
  File "/srv/homeassistant/lib/python3.5/site-packages/fedexdeliverymanager/__init__.py", line 102, in get_packages
    raise FedexError(err)
fedexdeliverymanager.FedexError: failed to get shipment list: Relogin

Can someone help me?

I have the same problem. Could not find solution. USPS has not been working for couple of month, now Fedex is gone for me.

Fedex was working fine for me up until the 0.63.3 update. At that time I also did a bunch of updates to Ubuntu files, so I can’t say for sure it was 0.63.3. But all was working fine up to that point. Getting the same errors as OP.

P.S. A new update to usps.py, using phantomjs, has fixed my usps issues. However, an update to phantomjs that was installed with some other Ubuntu updates broke USPS. Reverting to phantomjs 2.1.1 corrected the problem. See this thread for more on that: https://github.com/happyleavesaoc/python-myusps/issues/9#issuecomment-366365361

Submitted a github issue here: https://github.com/home-assistant/home-assistant/issues/12724. I’m having the same issue and same error message.

The error is because HASS is updating requests to 2.18.xx, MyUSPS and the FedEx component need 2.12.xx.

You can fix this by going into your virtual environment and executing pip3 install --upgrade myusps==1.3.2 and it will revert the required package.

We should open a github issue with @happyleaves and who ever maintains the FedEx component to see about a perm fix.

2 Likes

Is there a way to workaround this for Fedex?

I’m not sure you’d have to ping the author. Sorry.