atws

Larry Martell larry.martell at gmail.com
Thu Feb 22 10:06:00 EST 2018


On Thu, Feb 22, 2018 at 2:00 AM, Chris Angelico <rosuav at gmail.com> wrote:
> On Thu, Feb 22, 2018 at 5:27 PM, Larry Martell <larry.martell at gmail.com> wrote:
>> I want to use the atws package
>> (https://atws.readthedocs.io/readme.html). I am using python 2.7.6 on
>> ubuntu-trusty-64 3.13.0-87-generic. I get this error when importing
>> the package:
>>
>>>>> import atws
>> Traceback (most recent call last):
>>   File "<stdin>", line 1, in <module>
>>   File "/usr/local/lib/python2.7/dist-packages/atws/__init__.py", line
>> 4, in <module>
>>     from .wrapper import connect
>>   File "/usr/local/lib/python2.7/dist-packages/atws/wrapper.py", line
>> 32, in <module>
>>     from . import connection
>>   File "/usr/local/lib/python2.7/dist-packages/atws/connection.py",
>> line 19, in <module>
>>     from requests.exceptions import ConnectTimeout, Timeout,
>> ReadTimeout, SSLError
>> ImportError: cannot import name ConnectTimeout
>>
>> I would not be surprised if no one here has used this package, but has
>> anyone seen this error in other packages or their own work?
>
> You're running that on a fairly old version of Python (2.7.6 - the
> latest in the 2.x branch is 2.7.14). It's entirely possible that the
> app doesn't support the versions of Python and/or the 'requests'
> library that you have installed.
>
> First thing to try: can you use the app under Python 3?

This is a mature django app and I cannot switch to Python 3.

> For reference, here's the version of requests that I have (which does
> have that exception available):
>
>>>> import requests
>>>> requests.__version__
> '2.18.4'
>
> What's yours?

I had 2.2.1. I updated requests to 2.18.4 and now when I import atws I get:

No handlers could be found for logger "atws.connection"



More information about the Python-list mailing list