iotile / coretools

Core python tools for building and using IOTile based devices
GNU General Public License v3.0
14 stars 7 forks source link

Attempting to configure ext_cloud's link to cloud fails #787

Closed timothyfroehlich closed 5 years ago

timothyfroehlich commented 5 years ago

Ran the below command, got the following. I tried with a password that should have worked and a junk password, both gave me the same result.

(iotile_env) tfroehlich@tfroehlich-ThinkPad-P52s:~/proj/iotile_env                                                                                                                                                                          
$ iotile config link_cloud                                                                                                                                                                                                                  
Please enter your IOTile.cloud email: tfroehlich@archsys.io                                                                                                                                                                                 
Please enter your IOTile.cloud password:                                                                                                                                                                                                    
Traceback (most recent call last):                                                                                                                                                                                                          
  File "/home/tfroehlich/proj/iotile_env/lib/python3.6/site-packages/iotile/core/scripts/iotile_script.py", line 206, in main                                                                                                               
    finished = shell.invoke(line)                                                                                                                                                                                                           
  File "/home/tfroehlich/proj/iotile_env/lib/python3.6/site-packages/typedargs/shell.py", line 489, in invoke                                                                                                                               
    val, line, finished = self.invoke_one(line)                                                                                                                                                                                             
  File "/home/tfroehlich/proj/iotile_env/lib/python3.6/site-packages/typedargs/shell.py", line 452, in invoke_one                                                                                                                           
    val = func(*posargs, **kwargs)                                                                                                                                                                                                          
  File "</home/tfroehlich/proj/iotile_env/lib/python3.6/site-packages/decorator.py:decorator-gen-39>", line 2, in link_cloud                                                                                                                
  File "/home/tfroehlich/proj/iotile_env/lib/python3.6/site-packages/typedargs/utils.py", line 32, in _check_and_execute                                                                                                                    
    retval = func(*convargs, **convkw)                                                                                                                                                                                                      
  File "/home/tfroehlich/proj/iotile_env/lib/python3.6/site-packages/iotile/cloud/config.py", line 55, in link_cloud                                                                                                                        
    ok_resp = cloud.login(email=username, password=password)                                                                                                                                                                                
  File "/home/tfroehlich/proj/iotile_env/lib/python3.6/site-packages/iotile_cloud/api/connection.py", line 284, in login                                                                                                                    
    r = requests.post(url, data=payload, headers=DEFAULT_HEADERS, verify=self.verify)                                                                                                                                                       
  File "/home/tfroehlich/proj/iotile_env/lib/python3.6/site-packages/requests/api.py", line 88, in post                                                                                                                                     
    return request('post', url, data=data, **kwargs)                                                                                                                                                                                        
  File "/home/tfroehlich/proj/iotile_env/lib/python3.6/site-packages/requests/api.py", line 44, in request                                                                                                                                  
    return session.request(method=method, url=url, **kwargs)                                                                                                                                                                                
  File "/home/tfroehlich/proj/iotile_env/lib/python3.6/site-packages/requests/sessions.py", line 335, in request                                                                                                                            
    resp = self.send(prep, **send_kwargs)                                                                                                                                                                                                   
  File "/home/tfroehlich/proj/iotile_env/lib/python3.6/site-packages/requests/sessions.py", line 438, in send                                                                                                                               
    r = adapter.send(request, **kwargs)                                                                                                                                                                                                     
  File "/home/tfroehlich/proj/iotile_env/lib/python3.6/site-packages/requests/adapters.py", line 292, in send                                                                                                                               
    timeout=timeout
  File "/home/tfroehlich/proj/iotile_env/lib/python3.6/site-packages/requests/packages/urllib3/connectionpool.py", line 423, in urlopen
    conn = self._get_conn(timeout=pool_timeout)
  File "/home/tfroehlich/proj/iotile_env/lib/python3.6/site-packages/requests/packages/urllib3/connectionpool.py", line 238, in _get_conn
    return conn or self._new_conn()
  File "/home/tfroehlich/proj/iotile_env/lib/python3.6/site-packages/requests/packages/urllib3/connectionpool.py", line 562, in _new_conn
    strict=self.strict)
TypeError: __init__() got an unexpected keyword argument 'strict'

Pip list:

$ pip list
Package                             Version
----------------------------------- ---------
arch-node-tasks                     0.6.3
asciimatics                         1.10.0
bitstring                           3.1.5
blah                                0.1.12
catchy                              0.1.3
certifi                             2019.3.9
chardet                             3.0.4
dbus-python                         1.2.8
decorator                           4.4.0
entrypoints                         0.3
future                              0.17.1
idna                                2.8
iotile-cloud                        0.9.9
iotile-core                         4.1.0
iotile-emulate                      0.4.2
iotile-ext-cloud                    1.0.2
iotile-gateway                      2.1.0
iotile-sensorgraph                  1.0.4
iotile-support-con-nrf52832-3       3.2.2
iotile-support-firm-accelerometer-2 2.3.5
iotile-support-firm-env-1           1.1.1
iotile-support-lib-controller-3     3.7.14
iotile-support-prod-pod1m-1         1.0.2
iotile-test                         1.0.2
iotile-transport-bled112            2.0.2
locket                              0.1.1
monotonic                           1.5
msgpack                             0.6.1
paho-mqtt                           1.4.0
passlib                             1.7.1
Pillow                              5.4.1
pip                                 19.0.3
pyfiglet                            0.8.post1
pyparsing                           2.2.2
pyserial                            3.4
python-dateutil                     2.8.0
python-networkmanager               2.1
requests                            1.2.3
setuptools                          40.8.0
six                                 1.12.0
sortedcontainers                    2.1.0
toposort                            1.5
tornado                             4.5.3
typedargs                           1.0.0
urllib3                             1.24.1
wcwidth                             0.1.7
websockets                          7.0
wheel                               0.33.1
ws4py                               0.5.1
timothyfroehlich commented 5 years ago

Requests version was 1.2.3. Upgrading to the latest (2.21.0) fixed it. Not sure why an ancient requests package was installed...