Skip to content

Exception in Storage #29

Description

@ieure

From this support thread: https://groups.google.com/forum/#!topic/simplegeo/iygFmqrRGK4

Hi,

I'm trying to integrate the python sdk into our app.

The test record looks like this:

{"geometry": {"type": "Point", "coordinates": ["0", "0"]}, "properties": {"layer": "com.arctouch.simplegeo.whereabouts", "name": "Eric Chamberlain", "facebook_id": "786359552"}, "type": "Feature", "id": "a9e0bfcf-e09c-11e0-beb3-09313b4930f6", "created": 1316204476}

And it generates the following exception:

Traceback (most recent call last):
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/ext/webapp/_webapp25.py", line 701, in call
handler.get(*groups)
File "/Users/eric/ArcTouch/Projects/WAWEB/trunk/Whereabouts.GoogleAppEngine/main.py", line 88, in get
self.post()
File "/Users/eric/ArcTouch/Projects/WAWEB/trunk/Whereabouts.GoogleAppEngine/main.py", line 130, in post
result = client.storage.add_record(r)
File "/Users/eric/ArcTouch/Projects/WAWEB/trunk/Whereabouts.GoogleAppEngine/simplegeo/storage/init.py", line 31, in add_record
self._request(endpoint, "PUT", record.to_json())
File "/Users/eric/ArcTouch/Projects/WAWEB/trunk/Whereabouts.GoogleAppEngine/simplegeo/init.py", line 150, in _request
if self.headers['status'][0] not in ('2', '3'):
TypeError: 'int' object is unsubscriptable

Any idea why and how to prevent the exception?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions