Skip to content

support Google App Engine's URL fetch service #147

Open
@djc

Description

@djc

From acmo...@gmail.com on August 30, 2010 22:51:50

What steps will reproduce the problem? 1. use Google's App Engine SDK
2. install couchdb-python into your new project
3. import couchdb
2. attempt to connect to an external couchdb server with couch = couchdb.Server(' https://couchdb.example.com/' )
3. exception is raised What is the expected output? What do you see instead? Google has their own url fetch service in their app engine. < https://code.google.com/appengine/docs/python/urlfetch/overview.html >. Other than that, they appear to prevent applications from making external socket connections. It appears to me that since this code uses couchdb/http.py, it won't work on Google's app engine. Here's the stacktrace:

Traceback (most recent call last):
File "/home/amoore/dev/google_appengine/google/appengine/ext/webapp/init.py", line 511, in call
handler.get(_groups)
File "/home/amoore/dev/emradmin/main.py", line 13, in get
userdb = couch['user']
File "/home/amoore/dev/emradmin/lib/python2.5/site-packages/couchdb/client.py", line 137, in getitem
db.resource.head() # actually make a request to the database
File "/home/amoore/dev/emradmin/lib/python2.5/site-packages/couchdb/http.py", line 377, in head
return self._request('HEAD', path, headers=headers, *_params)
File "/home/amoore/dev/emradmin/lib/python2.5/site-packages/couchdb/http.py", line 419, in _request
credentials=self.credentials)
File "/home/amoore/dev/emradmin/lib/python2.5/site-packages/couchdb/http.py", line 239, in request
resp = _try_request_with_retries(iter(self.retry_delays))
File "/home/amoore/dev/emradmin/lib/python2.5/site-packages/couchdb/http.py", line 196, in _try_request_with_retries
return _try_request()
File "/home/amoore/dev/emradmin/lib/python2.5/site-packages/couchdb/http.py", line 211, in _try_request
if conn.sock is None:
AttributeError: HTTPConnection instance has no attribute 'sock'

If urllib, urllib2 or httplib were used instead, I think this would work. What version of the product are you using? On what operating system? python 2.5.2, Google App Engine, linux

Original issue: http://code.google.com/p/couchdb-python/issues/detail?id=147

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions