This repository was archived by the owner on May 22, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 100
This repository was archived by the owner on May 22, 2019. It is now read-only.
TypeError in user.shelves #25
Copy link
Copy link
Open
Description
Hi @sefakilic )
I appreciate the work you've done but there's a slight glitch in the package it seems.
I'm posting the output traceback, perhaps the error originates from xml dependency?
In [28]: user.reviews()
----------------------------------------------------------------
TypeError Traceback (most recent call last)
/Users/eklavya/anaconda/lib/python3.5/site-packages/xmltodict.py in parse(xml_input, encoding, expat, process_namespaces, namespace_separator, **kwargs)
308 try:
--> 309 parser.ParseFile(xml_input)
310 except (TypeError, AttributeError):
TypeError: argument must have 'read' attribute
During handling of the above exception, another exception occurred:
ExpatError Traceback (most recent call last)
<ipython-input-28-00cccc6e2a71> in <module>()
----> 1 user.reviews()
/Users/eklavya/anaconda/lib/python3.5/site-packages/goodreads/user.py in reviews(self, page)
79 """Get all books and reviews on user's shelves"""
80 resp = self._client.session.get("/review/list.xml",
---> 81 {'v': 2, 'id': self.gid, 'page': page})
82 return [review.GoodreadsReview(r) for r in resp['reviews']['review']]
83
/Users/eklavya/anaconda/lib/python3.5/site-packages/goodreads/session.py in get(self, path, params)
52 base = "https://www.goodreads.com/"
53 resp = self.session.get(base + path, params=params)
---> 54 return xmltodict.parse(resp.content)['GoodreadsResponse']
/Users/eklavya/anaconda/lib/python3.5/site-packages/xmltodict.py in parse(xml_input, encoding, expat, process_namespaces, namespace_separator, **kwargs)
309 parser.ParseFile(xml_input)
310 except (TypeError, AttributeError):
--> 311 parser.Parse(xml_input, True)
312 return handler.item
313
ExpatError: syntax error: line 1, column 0
Metadata
Metadata
Assignees
Labels
No labels