atws

Larry Martell larry.martell at gmail.com
Thu Feb 22 12:24:06 EST 2018


On Thu, Feb 22, 2018 at 10:25 AM, Mark Lawrence <breamoreboy at gmail.com> wrote:
> On 22/02/18 15:06, Larry Martell wrote:
>>
>> 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"
>>
>
> I get exactly the same thing, but do the import interactively and then
> help(atws) shows help so I'm guessing that it's just a poor informational
> message, so I suggest that you just try running your code and see what
> happens.

Thanks - it seems to work despite that message.

> p.s. enjoying the curling at the Winter Olympics?

For sure - huge upset over Canada! I stayed up until 3am watching the
women's hockey game last night and I had to be up at 6 this morning,
so I'm dragging now.



More information about the Python-list mailing list