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

FedEx Sensor Error #13131

Closed
Coolie1101 opened this issue Mar 12, 2018 · 25 comments
Closed

FedEx Sensor Error #13131

Coolie1101 opened this issue Mar 12, 2018 · 25 comments

Comments

@Coolie1101
Copy link

Home Assistant release (hass --version):
0.65.3

Python release (python3 --version):
3.5.3

Component/platform:
FedEx sensor

Description of problem:
Error Setting Up Component

Expected:
No Error

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

- platform: fedex
  name: 'Fedex'
  username: my_fedex_username
  password: my_fedex_password

Traceback (if applicable):

2018-03-12 10:44: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)

Additional info:
Left sensor disabled for a week, same error after upgrading HASS and re-enabling sensor.

@JBenzie
Copy link

JBenzie commented Mar 13, 2018

I'm experiencing the same issue with version 0.65.3. Same error and traceback..

@happyleavesaoc
Copy link
Contributor

Confirmed. Looking for a fix.

@ChristopherLMiller
Copy link

same here

@nickgreen239
Copy link

I am experiencing the same issue in version 0.65.4. I skipped .3 so that is why I did not notice it until now. In case it helps here is my traceback.

Fri Mar 23 2018 14:37:59 GMT-0400 (Eastern Daylight Time)

Error while setting up platform fedex
Traceback (most recent call last):
  File "/usr/src/app/homeassistant/helpers/entity_platform.py", line 82, in async_setup
    SLOW_SETUP_MAX_WAIT, loop=hass.loop)
  File "/usr/local/lib/python3.6/asyncio/tasks.py", line 358, in wait_for
    return fut.result()
  File "/usr/local/lib/python3.6/asyncio/futures.py", line 243, 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 "/usr/src/app/homeassistant/components/sensor/fedex.py", line 56, in setup_platform
    cookie_path=cookie)
  File "/usr/local/lib/python3.6/site-packages/fedexdeliverymanager/__init__.py", line 148, in get_session
    _login(session)
  File "/usr/local/lib/python3.6/site-packages/fedexdeliverymanager/__init__.py", line 83, in _login
    data = resp.json()
  File "/usr/local/lib/python3.6/site-packages/requests/models.py", line 892, in json
    return complexjson.loads(self.text, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/simplejson/__init__.py", line 518, in loads
    return _default_decoder.decode(s)
  File "/usr/local/lib/python3.6/site-packages/simplejson/decoder.py", line 370, in decode
    obj, end = self.raw_decode(s)
  File "/usr/local/lib/python3.6/site-packages/simplejson/decoder.py", line 400, in raw_decode
    return self.scan_once(s, idx=_w(s, idx).end())
simplejson.errors.JSONDecodeError: Expecting value: line 4 column 1 (char 4)

@edif30
Copy link
Contributor

edif30 commented Mar 24, 2018

Same here.

/home-assistant.log
2018-03-24 13:15:03 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up platform fedex
Traceback (most recent call last):
  File "/usr/src/app/homeassistant/helpers/entity_platform.py", line 82, in async_setup
    SLOW_SETUP_MAX_WAIT, loop=hass.loop)
  File "/usr/local/lib/python3.6/asyncio/tasks.py", line 358, in wait_for
    return fut.result()
  File "/usr/local/lib/python3.6/asyncio/futures.py", line 243, 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 "/usr/src/app/homeassistant/components/sensor/fedex.py", line 56, in setup_platform
    cookie_path=cookie)
  File "/usr/local/lib/python3.6/site-packages/fedexdeliverymanager/__init__.py", line 148, in get_session
    _login(session)
  File "/usr/local/lib/python3.6/site-packages/fedexdeliverymanager/__init__.py", line 83, in _login
    data = resp.json()
  File "/usr/local/lib/python3.6/site-packages/requests/models.py", line 892, in json
    return complexjson.loads(self.text, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/simplejson/__init__.py", line 518, in loads
    return _default_decoder.decode(s)
  File "/usr/local/lib/python3.6/site-packages/simplejson/decoder.py", line 370, in decode
    obj, end = self.raw_decode(s)
  File "/usr/local/lib/python3.6/site-packages/simplejson/decoder.py", line 400, in raw_decode
    return self.scan_once(s, idx=_w(s, idx).end())
simplejson.errors.JSONDecodeError: Expecting value: line 4 column 1 (char 4)

@dshokouhi
Copy link
Member

Seeing the same exact error here after a restart

@codymhorton
Copy link

codymhorton commented Apr 4, 2018

Having the same issue on 0.65.5

Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity_platform.py", line 188, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity.py", line 327, 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 319, 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 66, in wrapped
    _login(*args)
  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)

Edit also tried updating to 0.66.1 same issue.

brianjking added a commit to brianjking/homeassistant-config that referenced this issue Apr 6, 2018
rfpludwick pushed a commit to rfpludwick/home-assistant-config that referenced this issue Apr 6, 2018
@poldim
Copy link

poldim commented Apr 16, 2018

Having the same problem. Enabling the sensor breaks my GUI.

@balloobbot
Copy link

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.

Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍

@heytcass
Copy link
Contributor

Still broken, confirmed with 0.77.3.

Error given in Home Assistant logs:


Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/sensor/fedex.py", line 55, in setup_platform
    cookie_path=cookie)
  File "/usr/local/lib/python3.6/site-packages/fedexdeliverymanager/__init__.py", line 148, in get_session
    _login(session)
  File "/usr/local/lib/python3.6/site-packages/fedexdeliverymanager/__init__.py", line 82, in _login
    raise FedexError('could not login')
fedexdeliverymanager.FedexError: could not login

@dshokouhi
Copy link
Member

@happyleavesaoc any luck on a fix for this issue?

@qbunt
Copy link

qbunt commented Nov 9, 2018

Confirmed broken on 0.81.6

Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/sensor/fedex.py", line 55, 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 82, in _login
    raise FedexError('could not login')
fedexdeliverymanager.FedexError: could not login

@ziptbm
Copy link

ziptbm commented Jan 15, 2019

Was working for me up until I took 0.85.0. Now I get the following.

Update for sensor.fedex fails

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/fedexdeliverymanager/__init__.py", line 64, in wrapped
    return function(*args)
  File "/usr/local/lib/python3.6/site-packages/fedexdeliverymanager/__init__.py", line 103, 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 "/usr/src/app/homeassistant/helpers/entity.py", line 221, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/app/homeassistant/helpers/entity.py", line 349, in async_device_update
    await self.hass.async_add_executor_job(self.update)
  File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/app/homeassistant/util/__init__.py", line 315, in wrapper
    result = method(*args, **kwargs)
  File "/usr/src/app/homeassistant/components/sensor/fedex.py", line 93, in _update
    for package in fedexdeliverymanager.get_packages(self._session):
  File "/usr/local/lib/python3.6/site-packages/fedexdeliverymanager/__init__.py", line 66, in wrapped
    _login(*args)
  File "/usr/local/lib/python3.6/site-packages/fedexdeliverymanager/__init__.py", line 82, in _login
    raise FedexError('could not login')
fedexdeliverymanager.FedexError: could not login

@tacoman667
Copy link

Still broken in hassio 85.1.

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/sensor/fedex.py", line 55, in setup_platform
    cookie_path=cookie)
  File "/usr/local/lib/python3.6/site-packages/fedexdeliverymanager/__init__.py", line 148, in get_session
    _login(session)
  File "/usr/local/lib/python3.6/site-packages/fedexdeliverymanager/__init__.py", line 82, in _login
    raise FedexError('could not login')
fedexdeliverymanager.FedexError: could not login

@slamdf150xc
Copy link

slamdf150xc commented Jan 24, 2019

Still broken in hassio 86.1

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/sensor/fedex.py", line 55, in setup_platform cookie_path=cookie)
  File "/usr/local/lib/python3.6/site-packages/fedexdeliverymanager/__init__.py", line 148, in get_session _login(session)
  File "/usr/local/lib/python3.6/site-packages/fedexdeliverymanager/__init__.py", line 82, in _login raise FedexError('could not login')
fedexdeliverymanager.FedexError: could not login

Sorry, I guess I'm not smart enough to figure out how to format correctly. 😃

@JBenzie
Copy link

JBenzie commented Jan 29, 2019

86.3

019-01-29 14:10:35 ERROR (SyncWorker_9) [homeassistant.components.sensor.fedex] Could not connect to Fedex Delivery Manager
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/homeassistant/components/sensor/fedex.py", line 55, in setup_platform
    cookie_path=cookie)
  File "/usr/local/lib/python3.6/site-packages/fedexdeliverymanager/__init__.py", line 148, in get_session
    _login(session)
  File "/usr/local/lib/python3.6/site-packages/fedexdeliverymanager/__init__.py", line 82, in _login
    raise FedexError('could not login')
fedexdeliverymanager.FedexError: could not login

@JBenzie
Copy link

JBenzie commented Feb 1, 2019

Not sure what happened or changed, but now it appears to be working properly...? I haven't made any changes to my config.

Just thought I'd give an update..

@dshokouhi
Copy link
Member

@JBenzie that is the issue with this sensor, it will be fine for a while then it will die for a while etc... I personally stopped using it. There are other trackers you can use now that have FedEx I think. May be more reliable.

@JBenzie
Copy link

JBenzie commented Feb 1, 2019

Ohh, okay. This is the first it's actually worked for me in some time. My apologies for the false hope! Thanks for the response.

@Nowaker
Copy link

Nowaker commented May 12, 2019

Fresh Hass.io 0.92.2 setup, doesn't work.

2019-05-12 03:06:20 ERROR (SyncWorker_16) [homeassistant.components.fedex.sensor] Could not connect to Fedex Delivery Manager
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/homeassistant/components/fedex/sensor.py", line 47, in setup_platform
    cookie_path=cookie)
  File "/usr/local/lib/python3.7/site-packages/fedexdeliverymanager/__init__.py", line 148, in get_session
    _login(session)
  File "/usr/local/lib/python3.7/site-packages/fedexdeliverymanager/__init__.py", line 82, in _login
    raise FedexError('could not login')
fedexdeliverymanager.FedexError: could not login

@poldim
Copy link

poldim commented May 12, 2019

I've had this working for a while and recently having problems. Currently on latest 0.92.2:

Sun May 12 2019 10:20:27 GMT-0700 (Pacific Daylight Time)
fedex: Error on device update!
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/fedexdeliverymanager/__init__.py", line 64, in wrapped
    return function(*args)
  File "/usr/local/lib/python3.7/site-packages/fedexdeliverymanager/__init__.py", line 103, 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 "/usr/src/app/homeassistant/helpers/entity_platform.py", line 261, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/src/app/homeassistant/helpers/entity.py", line 377, in async_device_update
    await self.hass.async_add_executor_job(self.update)
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/app/homeassistant/util/__init__.py", line 224, in wrapper
    result = method(*args, **kwargs)
  File "/usr/src/app/homeassistant/components/fedex/sensor.py", line 85, in _update
    for package in fedexdeliverymanager.get_packages(self._session):
  File "/usr/local/lib/python3.7/site-packages/fedexdeliverymanager/__init__.py", line 66, in wrapped
    _login(*args)
  File "/usr/local/lib/python3.7/site-packages/fedexdeliverymanager/__init__.py", line 82, in _login
    raise FedexError('could not login')
fedexdeliverymanager.FedexError: could not login

Going to fedex.com with same credetials logs in without issues.

@Grey-Lancaster
Copy link

What are the other options for fedex?
Thanks,
Grey

@poldim
Copy link

poldim commented Jun 26, 2019

Looking into this a bit deeper.
It seems that #17089 may have been closed in error as @dshokouhi suggested it was a duplicate but the error is different. This issue refers to trouble with setting up the component and getting it working. But the most recent issues, same as I am experiencing, are could not login issues.

@balloob Since you recently chimed in on #24332, maybe you could close this ticket and reopen #17089?

@cjazinski
Copy link

Same issue on 0.95.4 :(

@frenck
Copy link
Member

frenck commented Aug 7, 2019

The fedex integration is now deprecated and is pending removal in Home Assistant 0.100.0

@frenck frenck closed this as completed Aug 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests