Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/294.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
SugarCRM Python API包装器-“;“非类型”;对象不可下标_Python_Sugarcrm - Fatal编程技术网

SugarCRM Python API包装器-“;“非类型”;对象不可下标

SugarCRM Python API包装器-“;“非类型”;对象不可下标,python,sugarcrm,Python,Sugarcrm,我从下载了SugarCRM Python API包装器 在试用基本登录代码时,我遇到了以下问题 >>> url = 'http://<REDACTED>/service/v2/rest.php' >>> user = '<REDACTED>' >>> passwd = '<REDACTED>' >>> import sugarcrm >>> session =

我从下载了SugarCRM Python API包装器

在试用基本登录代码时,我遇到了以下问题

 >>> url = 'http://<REDACTED>/service/v2/rest.php'
 >>> user = '<REDACTED>'
 >>> passwd = '<REDACTED>'
 >>> import sugarcrm
 >>> session = sugarcrm.Sugarcrm(url, user, passwd)
 Connecting to: http://<REDACTED>/service/v2/rest.php
 Traceback (most recent call last):
 File "<stdin>", line 1, in <module>
 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
>>url='1!'http:///service/v2/rest.php'
>>>用户=“”
>>>passwd=''
>>>导入sugarcrm
>>>session=sugarcrm.sugarcrm(url、用户、密码)
连接到:http:///service/v2/rest.php
回溯(最近一次呼叫最后一次):
文件“”,第1行,在
文件“/usr/local/lib/python2.7/dist packages/sugarcrm/sugarcrm.py”,第58行,在__
self.login(用户名、密码)
文件“/usr/local/lib/python2.7/dist packages/sugarcrm/sugarcrm.py”,第112行,登录
self.id=x[“id”]
TypeError:“非类型”对象不可下标

我做错什么了吗?

这里有一个解决办法: