oonid / google-api-python-client

Automatically exported from code.google.com/p/google-api-python-client
Other
0 stars 0 forks source link

strip() on HttpError.__str__ fails when message is None #234

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
[Use this form for both apiclient and oauth2client issues]

What steps will reproduce the problem?
1. Get an exception with data['error']['message'] == None
2. Try to print the exception

What is the expected output? What do you see instead?

The exception printed with its error message.

Instead I get
apiclient/errors.py", line 57, in __repr__
    self.resp.status, self.uri, self._get_reason().strip())
AttributeError: 'NoneType' object has no attribute 'strip'

What version of the product are you using? On what operating system?

Linux. Latest imported.

Please provide any additional information below.

Meanwhile data['error']['errors'] has interesting data that is not being 
printed at all.

Original issue reported on code.google.com by ho...@google.com on 30 Jan 2013 at 7:23

GoogleCodeExporter commented 8 years ago
"message" should never be None. Which API was this?

Original comment by jcgregorio@google.com on 8 Feb 2013 at 3:52

GoogleCodeExporter commented 8 years ago
Closing at this time, because "message" should never be None.

Original comment by jcgregorio@google.com on 12 Feb 2013 at 3:43

GoogleCodeExporter commented 8 years ago
Fixed in 
https://code.google.com/p/google-api-python-client/source/detail?r=e24bcd71efbbd
2568a83e7b339fb1e47e01cfce5

Original comment by jcgregorio@google.com on 20 Feb 2013 at 8:39

GoogleCodeExporter commented 8 years ago
Issue 240 has been merged into this issue.

Original comment by dhermes@google.com on 21 Feb 2013 at 2:26

GoogleCodeExporter commented 8 years ago
I had a few issues recently with exactly this problem (message was None), i 
attach a traceback from the app engine logfiles

python2.7
instance:  backend
apiclient: __version__ = "1.0"

Original comment by michael....@gmail.com on 27 Feb 2013 at 1:14

Attachments:

GoogleCodeExporter commented 8 years ago
Michael,

Did you clone the repository or download a ZIP from somewhere?

Original comment by dhermes@google.com on 27 Feb 2013 at 3:16