ozgur / python-linkedin

Python interface to the LinkedIn API
http://ozgur.github.com/python-linkedin/
MIT License
894 stars 392 forks source link

submit_group_post() call returns empty content #36

Closed dianatatu closed 10 years ago

dianatatu commented 10 years ago

When trying to submit a post to a group, the following error is raised:

>>> application.submit_group_post(group_id, title, summary, submitted_url, submitted_image_url, content_title, description)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "linkedin/linkedin.py", line 363, in submit_group_post
    response = response.json()
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/requests/models.py", line 733, in json
    return json.loads(self.text, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/simplejson/__init__.py", line 488, in loads
    return _default_decoder.decode(s)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/simplejson/decoder.py", line 370, in decode
    obj, end = self.raw_decode(s)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/simplejson/decoder.py", line 389, in raw_decode
    return self.scan_once(s, idx=_w(s, idx).end())
simplejson.scanner.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

because the response has an empty content that cannot be json decoded.

What is the expected content of a successful response?

ozgur commented 10 years ago

It is fixed in master branch. I'll submit a new version into pypi asap.