sugarcrm/python_webservices_library — Issue #3: "NoneType" object is not subscriptable
Author: jogjayr
Created: 2011-10-13 17:13:59+00:00
State: open

I have problems logging in with the default script:

>>> url = 'http:///service/v2/rest.php'
>>> user = ''
>>> passwd = ''
>>> import sugarcrm
>>> session = sugarcrm.Sugarcrm(url, user, passwd)
Connecting to: http:///service/v2/rest.php
Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python2.7/dist-packages/sugarcrm/sugarcrm.py", line 58, in __init__
self.login(username, password)
File "/usr/local/lib/python2.7/dist-packages/sugarcrm/sugarcrm.py", line 112, in login
self.id = x["id"]
TypeError: 'NoneType' object is not subscriptable

Also posted on StackOverflow in case I'm doing something wrong: http://stackoverflow.com/questions/7751416/sugarcrm-python-api-wrapper-nonetype-object-is-not-subscriptable

Appreciate your attention and time. Thanks.