Skip to content

Wrong URL has strange error message. #9

@jharkins

Description

@jharkins

I fat fingered the URL parameter for the Sugarcrm construct and it was causing a strange error, namely:

Traceback (most recent call last):
File "gic.py", line 11, in
conn = sugarcrm.Sugarcrm(url, username, password)
File "/usr/local/lib/python2.7/dist-packages/sugarcrm/sugarcrm.py", line 42, in init
self._login(username, password)
File "/usr/local/lib/python2.7/dist-packages/sugarcrm/sugarcrm.py", line 125, in _login
x = self._sendRequest('login', args)
File "/usr/local/lib/python2.7/dist-packages/sugarcrm/sugarcrm.py", line 106, in _sendRequest
result = json.loads(response)
File "/usr/lib/python2.7/json/init.py", line 326, in loads
return _default_decoder.decode(s)
File "/usr/lib/python2.7/json/decoder.py", line 366, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python2.7/json/decoder.py", line 384, in raw_decode
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded

When I finally figured out that I had erroneously set my URL, I was able to get things working as advertised. I think it'd be nice if there was a ConnectionError or something more descriptive.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions