Core: TypeError: unorderable types in requests library

Created on 5 Nov 2017  路  13Comments  路  Source: home-assistant/core

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.57.1

Python release (python3 --version):
3.5.3

Component/platform:
TwitterAPI

Description of problem:
Twitter notification fails to load

Expected:

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




    1. 2.
  1. 3.

Traceback (if applicable):

[homeassistant.components.notify] Error setting up platform twitter
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/notify/__init__.py", line 101, in async_setup_platform
    platform.get_service, hass, p_config, discovery_info)
  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/components/notify/twitter.py", line 47, in get_service
    config.get(CONF_USERNAME)
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/notify/twitter.py", line 57, in __init__
    from TwitterAPI import TwitterAPI
  File "/srv/homeassistant/lib/python3.5/site-packages/TwitterAPI/TwitterAPI.py", line 11, in <module>
    from requests_oauthlib import OAuth1
  File "/srv/homeassistant/lib/python3.5/site-packages/requests_oauthlib/__init__.py", line 9, in <module>
    if requests.__version__ < '2.0.0':
TypeError: unorderable types: module() < str()

Additional info:

waiting-for-reply

Most helpful comment

I'm also seeing this issue starting with version 0.57.0.

I have rolled back requests (2.18.4) to version 2.14.2 with the command:

pip3 install requests==2.14.2

After restarting HA, the Twitter notifier works again.

Looks to be the same error as: #10326

All 13 comments

Works fine on dev. There were no changes to the implementation in last couple of releases.

I'm also seeing this issue starting with version 0.57.0.

I have rolled back requests (2.18.4) to version 2.14.2 with the command:

pip3 install requests==2.14.2

After restarting HA, the Twitter notifier works again.

Looks to be the same error as: #10326

In #9876 requests was upgraded. I'm running Python 3.6.3 and have requests 2.18.4. This works at least for Twitter. TwitterAPI is not pinning a requests release thus I wonder if it could be related to Python 3.5.x.

Sounds possible. I'm also on Python 3.5.3 (Hassbian on Stretch).

I'm also on Hassbian on Stretch. Python 3.5.3. Downgrading requests solved this problem.

I'm on Python 3.6 (running in Docker) and I can not reproduce https://github.com/home-assistant/home-assistant/issues/10326 with my setup.

I upgraded from 3.5.3 to 3.6.3 on my Hassbian-Stretch. I can confirm that the issue is gone. This issue is specific to requests (2.18.4) on python 3.5.3.

This seems to be a problem isolated to users running Hassbian.
https://github.com/home-assistant/home-assistant/issues/10326#issuecomment-349136500

Same problem with fitbit, but downgrading requests didn't help whatsoever. (raspbian / python 3.5.x)

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 :+1:

Updating to latest version has resolved this. It was an issue with requests python library version as mentioned by various comments here. closing this!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

soldag picture soldag  路  143Comments

ariel-madril picture ariel-madril  路  451Comments

kdschlosser picture kdschlosser  路  374Comments

sagilo picture sagilo  路  130Comments

Bergasha picture Bergasha  路  176Comments