Deploy KindleEar through GAE ERROR appcfg.py:2449 - python

Here is the code and tutorials: https://github.com/cdhigh/kindleear
I tried a lot of times but it failed with following error message. No matter how you use cmd mode or GAE launcher, it was always the same issue. I have no idea what's going on. Could you help me?
P.S.:Windows 7 64bit OS ,2.7.10 Python,GAE SDK 1.9.22
c:\Program Files (x86)\Google\google_appengine>c:\python27\python.exe
appcfg.py update c:\users\my\applications\mywhitekindleear\app.yaml c:\users\my\applicatio
ns\mywhitekindleear\module-worker.yaml
05:15 PM Host: appengine.google.com
05:15 PM Application: mywhitekindleear; version: 1
05:15 PM
Starting update of app: mywhitekindleear, version: 1
05:15 PM Getting current resource limits.
2015-06-19 17:23:38,694 ERROR appcfg.py:2449 An error occurred processing file '
': [Errno 10060] . Aborting.
Traceback (most recent call last):
File "appcfg.py", line 133, in <module>
run_file(__file__, globals())
File "appcfg.py", line 129, in run_file
execfile(_PATHS.script_file(script_name), globals_)
File "c:\Program Files (x86)\Google\google_appengine\google\appengine\tools\ap
pcfg.py", line 5486, in <module>
main(sys.argv)
File "c:\Program Files (x86)\Google\google_appengine\google\appengine\tools\ap
pcfg.py", line 5477, in main
result = AppCfgApp(argv).Run()
File "c:\Program Files (x86)\Google\google_appengine\google\appengine\tools\ap
pcfg.py", line 3018, in Run
self.action(self)
File "c:\Program Files (x86)\Google\google_appengine\google\appengine\tools\ap
pcfg.py", line 5133, in __call__
return method()
File "c:\Program Files (x86)\Google\google_appengine\google\appengine\tools\ap
pcfg.py", line 3825, in Update
self.UpdateUsingSpecificFiles()
File "c:\Program Files (x86)\Google\google_appengine\google\appengine\tools\ap
pcfg.py", line 3817, in UpdateUsingSpecificFiles
self.UpdateVersion(rpcserver, self.basepath, module_yaml, file_name)
File "c:\Program Files (x86)\Google\google_appengine\google\appengine\tools\ap
pcfg.py", line 3793, in UpdateVersion
return appversion.DoUpload(paths, openfunc)
File "c:\Program Files (x86)\Google\google_appengine\google\appengine\tools\ap
pcfg.py", line 2439, in DoUpload
self.error_fh)
File "c:\Program Files (x86)\Google\google_appengine\google\appengine\tools\ap
pcfg.py", line 493, in GetResourceLimits
resource_limits.update(_GetRemoteResourceLimits(logging_context))
File "c:\Program Files (x86)\Google\google_appengine\google\appengine\tools\ap
pcfg.py", line 463, in _GetRemoteResourceLimits
yaml_data = logging_context.Send('/api/appversion/getresourcelimits')
File "c:\Program Files (x86)\Google\google_appengine\google\appengine\tools\ap
pcfg.py", line 1749, in Send
result = self.rpcserver.Send(url, payload=payload, **kwargs)
File "c:\Program Files (x86)\Google\google_appengine\google\appengine\tools\ap
pengine_rpc_httplib2.py", line 236, in Send
url, method=method, body=payload, headers=headers)
File "c:\Program Files (x86)\Google\google_appengine\lib\httplib2\httplib2\__i
nit__.py", line 1584, in request
(response, content) = self._request(conn, authority, uri, request_uri, metho
d, body, headers, redirections, cachekey)
File "c:\Program Files (x86)\Google\google_appengine\lib\httplib2\httplib2\__i
nit__.py", line 1332, in _request
(response, content) = self._conn_request(conn, request_uri, method, body, he
aders)
File "c:\Program Files (x86)\Google\google_appengine\lib\httplib2\httplib2\__i
nit__.py", line 1306, in _conn_request
conn.connect()
File "c:\Program Files (x86)\Google\google_appengine\lib\httplib2\httplib2\__i
nit__.py", line 1053, in connect
raise socket.error, msg
socket.error: [Errno 10060]
c:\Program Files (x86)\Google\google_appengine>

Happened same with me. Then I found out that I am not running the command "appcfg.py ....." in the correct directory. You may want to browse to the directory where your project is present and not in the Google/appengine directory i.e in simple words browse to where your app.yaml and module-worker.yaml are located and try to run the command again.
Hope it helps.
p.s. Dont forget to add PATH of appengine to your system directory

Related

Unable to deploy google app engine app python on windows

I have a website on app engine - uses python. We have updated the site - to a more modern bootstrap affair. We can now no longer deploy it we get the following error:
2017-04-11 22:27:17 Running command: "['C:\\Python27\\pythonw.exe', '-u', 'C:\\Program Files (x86)\\Google\\google_appengine\\appcfg.py', '--oauth2_credential_file=C:\\Users\\spydre/.appcfg_oauth2_tokens', 'update', 'C:\\Users\\spydre\\ashfordchroming2015']"
10:27 PM Application: ashfordchroming2015; version: 1
10:27 PM Host: appengine.google.com
10:27 PM Starting update of app: ashfordchroming2015, version: 1
10:27 PM Getting current resource limits.
10:27 PM Scanning files on local disk.
Could not guess mimetype for static/plugins/jquery-1.11.1.min.map. Using application/octet-stream.
Could not guess mimetype for static/plugins/rs-plugin/font/revicons.eot. Using application/octet-stream.
Could not guess mimetype for static/plugins/rs-plugin/assets/arrows.psd. Using application/octet-stream.
Could not guess mimetype for static/plugins/rs-plugin/assets/bullets.psd. Using application/octet-stream.
Could not guess mimetype for static/plugins/rs-plugin/assets/small_arrows.psd. Using application/octet-stream.
10:27 PM Scanned 500 files.
Could not guess mimetype for static/bootstrap/css/bootstrap-theme.css.map. Using application/octet-stream.
Could not guess mimetype for static/bootstrap/css/bootstrap.css.map. Using application/octet-stream.
Could not guess mimetype for static/plugins/rs-plugin/assets/small_arrows.psd. Using application/octet-stream.
Could not guess mimetype for static/bootstrap/css/bootstrap.css.map. Using application/octet-stream.
Could not guess mimetype for static/plugins/rs-plugin/assets/bullets.psd. Using application/octet-stream.
Could not guess mimetype for static/bootstrap/css/bootstrap-theme.css.map. Using application/octet-stream.
Could not guess mimetype for static/plugins/rs-plugin/assets/arrows.psd. Using application/octet-stream.
Could not guess mimetype for static/plugins/rs-plugin/font/revicons.eot. Using application/octet-stream.
Could not guess mimetype for static/plugins/jquery-1.11.1.min.map. Using application/octet-stream.
10:27 PM Cloning 476 static files.
10:27 PM Cloning 119 application files.
10:27 PM Uploading 249 files and blobs.
2017-04-11 22:29:29,138 ERROR appcfg.py:2587 An unexpected error occurred. Aborting.
Traceback (most recent call last):
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\appcfg.py", line 2425, in DoUpload
self._UploadMissingFiles(missing_files, openfunc)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\appcfg.py", line 2554, in _UploadMissingFiles
self.UploadFile(missing_file, file_handle)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\appcfg.py", line 2055, in UploadFile
file_classification.StaticMimeType())
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\appcfg.py", line 1477, in AddToBatch
self.SendSingleFile(path, payload, mime_type)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\appcfg.py", line 1423, in SendSingleFile
path=path)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\appcfg.py", line 1719, in Send
result = self.rpcserver.Send(url, payload=payload, **kwargs)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\appengine_rpc_httplib2.py", line 246, in Send
url, method=method, body=payload, headers=headers)
File "C:\Program Files (x86)\Google\google_appengine\lib\oauth2client\oauth2client\client.py", line 569, in new_request
redirections, connection_type)
File "C:\Program Files (x86)\Google\google_appengine\lib\httplib2\httplib2\__init__.py", line 1584, in request
(response, content) = self._request(conn, authority, uri, request_uri, method, body, headers, redirections, cachekey)
File "C:\Program Files (x86)\Google\google_appengine\lib\httplib2\httplib2\__init__.py", line 1332, in _request
(response, content) = self._conn_request(conn, request_uri, method, body, headers)
File "C:\Program Files (x86)\Google\google_appengine\lib\httplib2\httplib2\__init__.py", line 1306, in _conn_request
conn.connect()
File "C:\Program Files (x86)\Google\google_appengine\lib\httplib2\httplib2\__init__.py", line 1053, in connect
raise socket.error, msg
error: [Errno 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
10:29 PM Rolling back the update.
Traceback (most recent call last):
File "C:\Program Files (x86)\Google\google_appengine\appcfg.py", line 133, in <module>
run_file(__file__, globals())
File "C:\Program Files (x86)\Google\google_appengine\appcfg.py", line 129, in run_file
execfile(_PATHS.script_file(script_name), globals_)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\appcfg.py", line 5510, in <module>
main(sys.argv)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\appcfg.py", line 5501, in main
result = AppCfgApp(argv).Run()
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\appcfg.py", line 2975, in Run
self.action(self)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\appcfg.py", line 5157, in __call__
return method()
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\appcfg.py", line 3889, in Update
self._UpdateWithParsedAppYaml(appyaml, self.basepath)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\appcfg.py", line 3942, in _UpdateWithParsedAppYaml
self.UpdateVersion(rpcserver, basepath, appyaml, APP_YAML_FILENAME)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\appcfg.py", line 3824, in UpdateVersion
return appversion.DoUpload(paths, openfunc)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\appcfg.py", line 2425, in DoUpload
self._UploadMissingFiles(missing_files, openfunc)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\appcfg.py", line 2554, in _UploadMissingFiles
self.UploadFile(missing_file, file_handle)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\appcfg.py", line 2055, in UploadFile
file_classification.StaticMimeType())
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\appcfg.py", line 1477, in AddToBatch
self.SendSingleFile(path, payload, mime_type)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\appcfg.py", line 1423, in SendSingleFile
path=path)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\appcfg.py", line 1719, in Send
result = self.rpcserver.Send(url, payload=payload, **kwargs)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\appengine_rpc_httplib2.py", line 246, in Send
url, method=method, body=payload, headers=headers)
File "C:\Program Files (x86)\Google\google_appengine\lib\oauth2client\oauth2client\client.py", line 569, in new_request
redirections, connection_type)
File "C:\Program Files (x86)\Google\google_appengine\lib\httplib2\httplib2\__init__.py", line 1584, in request
(response, content) = self._request(conn, authority, uri, request_uri, method, body, headers, redirections, cachekey)
File "C:\Program Files (x86)\Google\google_appengine\lib\httplib2\httplib2\__init__.py", line 1332, in _request
(response, content) = self._conn_request(conn, request_uri, method, body, headers)
File "C:\Program Files (x86)\Google\google_appengine\lib\httplib2\httplib2\__init__.py", line 1306, in _conn_request
conn.connect()
File "C:\Program Files (x86)\Google\google_appengine\lib\httplib2\httplib2\__init__.py", line 1053, in connect
raise socket.error, msg
socket.error: [Errno 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
2017-04-11 22:29:31 (Process exited with code 1)
We are using windows 10 have downloaded the latest CLI and are running on Python. However the site is running on webapp python 2.5. We have not upgraded it to 2.7.

Deployment error on Google App engine launcher for python application

I am trying to deploy a python application on google app engine using google app engine launcher.
The Project ID is same as my application name is app.yaml file
But still I am getting the following error in log.
appcfg.py:2450 An error occurred processing file '': EOF occurred in violation of protocol (_ssl.c:581). Aborting.
Traceback (most recent call last):
File "C:\Program Files (x86)\Google\google_appengine\appcfg.py", line 133, in <module>
run_file(__file__, globals())
File "C:\Program Files (x86)\Google\google_appengine\appcfg.py", line 129, in run_file
execfile(_PATHS.script_file(script_name), globals_)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\appcfg.py", line 5509, in <module>
main(sys.argv)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\appcfg.py", line 5500, in main
result = AppCfgApp(argv).Run()
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\appcfg.py", line 3019, in Run
self.action(self)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\appcfg.py", line 5156, in __call__
return method()
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\appcfg.py", line 3878, in Update
self._UpdateWithParsedAppYaml(appyaml, self.basepath)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\appcfg.py", line 3931, in _UpdateWithParsedAppYaml
self.UpdateVersion(rpcserver, basepath, appyaml, APP_YAML_FILENAME)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\appcfg.py", line 3816, in UpdateVersion
return appversion.DoUpload(paths, openfunc)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\appcfg.py", line 2440, in DoUpload
self.error_fh)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\appcfg.py", line 494, in GetResourceLimits
resource_limits.update(_GetRemoteResourceLimits(logging_context))
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\appcfg.py", line 464, in _GetRemoteResourceLimits
yaml_data = logging_context.Send('/api/appversion/getresourcelimits')
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\appcfg.py", line 1750, in Send
result = self.rpcserver.Send(url, payload=payload, **kwargs)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\appengine_rpc_httplib2.py", line 236, in Send
url, method=method, body=payload, headers=headers)
File "C:\Program Files (x86)\Google\google_appengine\lib\httplib2\httplib2\__init__.py", line 1584, in request
(response, content) = self._request(conn, authority, uri, request_uri, method, body, headers, redirections, cachekey)
File "C:\Program Files (x86)\Google\google_appengine\lib\httplib2\httplib2\__init__.py", line 1332, in _request
(response, content) = self._conn_request(conn, request_uri, method, body, headers)
File "C:\Program Files (x86)\Google\google_appengine\lib\httplib2\httplib2\__init__.py", line 1268, in _conn_request
conn.connect()
File "C:\Program Files (x86)\Google\google_appengine\lib\httplib2\httplib2\__init__.py", line 1014, in connect
self.disable_ssl_certificate_validation, self.ca_certs)
File "C:\Program Files (x86)\Google\google_appengine\lib\httplib2\httplib2\__init__.py", line 80, in _ssl_wrap_socket
cert_reqs=cert_reqs, ca_certs=ca_certs)
File "C:\Python27\lib\ssl.py", line 891, in wrap_socket
ciphers=ciphers)
File "C:\Python27\lib\ssl.py", line 566, in __init__
self.do_handshake()
File "C:\Python27\lib\ssl.py", line 788, in do_handshake
self._sslobj.do_handshake()
ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:581)
2015-07-13 14:35:47 (Process exited with code 1)

blobstore inside a taskqueue/deferred

I am trying to import a large User Information list from a json file to the datastore using taskqueue and deferred.
A User contains the user's information including an image url from a different app. During the importing process, the image should be grabbed and uploaded to the blob (which works just fine when tested).
I got stuck with getting the blob_key of the uploaded image.
And I think it only occurs inside a taskqueue/deferred because I tried it inside a 'normal' GET request handler, it works just fine.
This is my handler:
class MigrationTask(BaseHandler):
def post(self):
if not self.request.get('file'):
return
json_data = open(self.request.get('file'))
data = json.load(json_data)
json_data.close()
for datum in data['results']:
deferred.defer(push_user_to_db, datum)
this are my functions:
#ndb.transactional(xg=True)
def _push_user_to_db(profilePicture=None, ...):
if profilePicture:
if 'url' in profilePicture:
con = urlfetch.fetch(image_url)
if con.status_code == 200:
file_name = files.blobstore.create(mime_type='application/octet-stream')
with files.open(file_name, 'a') as f:
f.write(con.content)
files.finalize(file_name)
blob_key = files.blobstore.get_blob_key(file_name) # this part is where it errs
image_url = images.get_serving_url(file_name)
# some codes here...
def push_user_to_db(kwargs):
_push_user_to_db(**kwargs)
part of the traceback:
blob_key = files.blobstore.get_blob_key(file_name)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\api\files\blobstore.py", line 132, in get_blob_key
namespace='')])[0]
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\api\datastore.py", line 654, in Get
return GetAsync(keys, **kwargs).get_result()
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\api\datastore.py", line 629, in GetAsync
return _GetConnection().async_get(config, keys, local_extra_hook)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\datastore\datastore_rpc.py", line 1574, in async_get
pbs = [key_to_pb(key) for key in keys]
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\ext\ndb\model.py", line 653, in key_to_pb
return key.reference()
AttributeError: 'Key' object has no attribute 'reference'
PS: I've also tried taskqueue instead of deferred.
EDIT(1):
This is the traceback:
ERROR 2015-03-03 06:32:44,720 webapp2.py:1552] 'Key' object has no attribute 'reference'
Traceback (most recent call last):
File "C:\Program Files (x86)\Google\google_appengine\lib\webapp2-2.5.2\webapp2.py", line 1535, in __call__
rv = self.handle_exception(request, response, e)
File "C:\Program Files (x86)\Google\google_appengine\lib\webapp2-2.5.2\webapp2.py", line 1529, in __call__
rv = self.router.dispatch(request, response)
File "C:\Program Files (x86)\Google\google_appengine\lib\webapp2-2.5.2\webapp2.py", line 1278, in default_dispatcher
return route.handler_adapter(request, response)
File "C:\Program Files (x86)\Google\google_appengine\lib\webapp2-2.5.2\webapp2.py", line 1102, in __call__
return handler.dispatch()
File "C:\Program Files (x86)\Google\google_appengine\lib\webapp2-2.5.2\webapp2.py", line 572, in dispatch
return self.handle_exception(e, self.app.debug)
File "C:\Program Files (x86)\Google\google_appengine\lib\webapp2-2.5.2\webapp2.py", line 570, in dispatch
return method(*args, **kwargs)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\ext\deferred\deferred.py", line 310, in post
self.run_from_request()
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\ext\deferred\deferred.py", line 305, in run_from_request
run(self.request.body)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\ext\deferred\deferred.py", line 147, in run
return func(*args, **kwds)
File "C:\project directory\migration.py", line 141, in push_user_to_db
_push_user_to_db(**kwargs)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\ext\ndb\utils.py", line 179, in inner_wrapper
return wrapped_decorator(func, args, kwds, **options)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\ext\ndb\model.py", line 3759, in transactional
func, args, kwds, **options).get_result()
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\ext\ndb\tasklets.py", line 325, in get_result
self.check_success()
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\ext\ndb\tasklets.py", line 371, in _help_tasklet_along
value = gen.send(val)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\ext\ndb\context.py", line 999, in transaction
result = callback()
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\ext\ndb\model.py", line 3767, in <lambda>
return transaction_async(lambda: func(*args, **kwds), **options)
File "C:\project directory\migration.py", line 56, in _push_user_to_db
blob_key = files.blobstore.get_blob_key(file_name)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\api\files\blobstore.py", line 132, in get_blob_key
namespace='')])[0]
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\api\datastore.py", line 654, in Get
return GetAsync(keys, **kwargs).get_result()
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\api\datastore.py", line 629, in GetAsync
return _GetConnection().async_get(config, keys, local_extra_hook)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\datastore\datastore_rpc.py", line 1574, in async_get
pbs = [key_to_pb(key) for key in keys]
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\ext\ndb\model.py", line 653, in key_to_pb
return key.reference()
AttributeError: 'Key' object has no attribute 'reference'
Heads up! Writing files to the Blobstore using the files api has been deprecated. I had this issue before. My codes run perfectly fine in development server (localhost) but erred on App Engine server. The solution is to write the files in the Google Cloud Storage via Blobstore API.

Google AppEngine deployment failure ERROR appcfg.py

I'm new at Google Cloud services. I'm trying AppEngine. I'm just following the python tutorial here : https://developers.google.com/appengine/docs/python/gettingstartedpython27/uploading
I'm trying to deploy my file in Google but it doesn't work and I don't know why ! First I've forgotten to modify the app.yaml file but now I have filled the "application" with "direct-way-658" which is the name of my application!
Here the log information:
2014-07-29 14:28:47 Running command: "['C:\\python27_x64\\python.exe', '-u', 'C:\\Program Files (x86)\\Google\\google_appengine\\appcfg.py', '--no_cookies', u'--email=akash.myeamail#gmail.com', '--passin', 'update', 'D:\\POCGOOGLE\\guestbook']"
02:28 PM Application: direct-way-658; version: 1
02:28 PM Host: appengine.google.com
02:28 PM Starting update of app: direct-way-658, version: 1
02:28 PM Getting current resource limits.
2014-07-29 14:28:48,681 ERROR appcfg.py:2395 An error occurred processing file '': <urlopen error [Errno 11004] getaddrinfo failed>. Aborting.
Traceback (most recent call last):
File "C:\Program Files (x86)\Google\google_appengine\appcfg.py", line 126, in <module>
run_file(__file__, globals())
File "C:\Program Files (x86)\Google\google_appengine\appcfg.py", line 122, in run_file
execfile(_PATHS.script_file(script_name), globals_)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\appcfg.py", line 5334, in <module>
main(sys.argv)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\appcfg.py", line 5325, in main
result = AppCfgApp(argv).Run()
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\appcfg.py", line 2963, in Run
self.action(self)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\appcfg.py", line 4991, in __call__
return method()
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\appcfg.py", line 3762, in Update
self._UpdateWithParsedAppYaml(appyaml, self.basepath)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\appcfg.py", line 3815, in _UpdateWithParsedAppYaml
self.UpdateVersion(rpcserver, basepath, appyaml, APP_YAML_FILENAME)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\appcfg.py", line 3698, in UpdateVersion
return appversion.DoUpload(paths, openfunc)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\appcfg.py", line 2385, in DoUpload
self.error_fh)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\appcfg.py", line 468, in GetResourceLimits
resource_limits.update(_GetRemoteResourceLimits(logging_context))
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\appcfg.py", line 438, in _GetRemoteResourceLimits
yaml_data = logging_context.Send('/api/appversion/getresourcelimits')
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\appcfg.py", line 1724, in Send
result = self.rpcserver.Send(url, payload=payload, **kwargs)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\appengine_rpc.py", line 409, in Send
f = self.opener.open(req)
File "C:\python27_x64\lib\urllib2.py", line 404, in open
response = self._open(req, data)
File "C:\python27_x64\lib\urllib2.py", line 422, in _open
'_open', req)
File "C:\python27_x64\lib\urllib2.py", line 382, in _call_chain
result = func(*args)
File "C:\python27_x64\lib\urllib2.py", line 1222, in https_open
return self.do_open(httplib.HTTPSConnection, req)
File "C:\Program Files (x86)\Google\google_appengine\lib\fancy_urllib\fancy_urllib\__init__.py", line 387, in do_open
raise url_error
urllib2.URLError: <urlopen error [Errno 11004] getaddrinfo failed>
2014-07-29 14:28:48 (Process exited with code 1)
You can close this window now.
Can you help me please ?
Can you post your app.yaml? Looks like its trying to upload a file with no name "An error occurred processing file '': . Aborting."
I faced something similar while trying to upload a .json file, by following the suggestion here https://gist.github.com/darktable/873098 I edited my App.yaml and added a mime type and it worked.
application: your_app
version: 1
runtime: php
api_version: 1
handlers:
- url: /static
static_dir: static
- url: /.*
script: index.php
- url: /(.*\.json)
mime_type: application/json
static_files: static/\1
upload: static/(.*\.json)
expiration: "1h"
Thank you all for your anwsers ! But it was a proxy problem. The compagny I work for use a proxy for all it connection with internet do I had to set my enrironment variables so that Google app engine go through this proxy.
In the Google SDK shell :
set HTTP_PROXY=http:// name:pass#proxy:port
set HTTPS_PROXY=http:// name:pass#proxy:port
then lanch the app :
appcfg.py update name_of_the_app/

Error with Images service after converting to Python 2.7

I'm in the process of switching an application over from Python 2.5 to 2.7 and have begun encountering a problem with the images service. For example, saving this entity using db.put():
from google.appengine.api import images
class Images(db.Expando):
ImageTitle = db.StringProperty()
ImageFile = blobstore.BlobReferenceProperty()
ImageReference = db.StringProperty()
def put(self, **kwargs):
if not self.ImageReference:
self.ImageReference = images.get_serving_url(self.ImageFile.key())
super(Images, self).put(**kwargs)
Now yields this error:
Traceback (most recent call last):
File "C:\Program Files (x86)\Google\google_appengine\lib\webapp2\webapp2.py", line 1536, in __call__
rv = self.handle_exception(request, response, e)
File "C:\Program Files (x86)\Google\google_appengine\lib\webapp2\webapp2.py", line 1530, in __call__
rv = self.router.dispatch(request, response)
File "C:\Program Files (x86)\Google\google_appengine\lib\webapp2\webapp2.py", line 1278, in default_dispatcher
return route.handler_adapter(request, response)
File "C:\Program Files (x86)\Google\google_appengine\lib\webapp2\webapp2.py", line 1102, in __call__
return handler.dispatch()
File "C:\Program Files (x86)\Google\google_appengine\lib\webapp2\webapp2.py", line 572, in dispatch
return self.handle_exception(e, self.app.debug)
File "C:\Program Files (x86)\Google\google_appengine\lib\webapp2\webapp2.py", line 570, in dispatch
return method(*args, **kwargs)
File "C:\Users\VB User\Bruha\src\handler_product_page_image.py", line 40, in post
image.put()
File "C:\Users\VB User\Bruha\src\db_models.py", line 56, in put
self.ImageReference = images.get_serving_url(self.ImageFile.key())
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\api\images\__init__.py", line 1792, in get_serving_url
rpc = get_serving_url_async(blob_key, size, crop, secure_url, filename, rpc)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\api\images\__init__.py", line 1907, in get_serving_url_async
None)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\api\images\__init__.py", line 1034, in _make_async_call
rpc = create_rpc()
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\api\images\__init__.py", line 1028, in create_rpc
return apiproxy_stub_map.UserRPC("images", deadline, callback)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\api\apiproxy_stub_map.py", line 405, in __init__
self.__rpc = CreateRPC(service, stubmap)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\api\apiproxy_stub_map.py", line 69, in CreateRPC
'a CreateRPC method.') % service)
AssertionError: The service "images" doesn't have a CreateRPC method.
Calling the 'execute_transforms' method also yields the same error.
Any help understanding what is going on would be much appreciated.
You are running the dev server, so when you start up check for this message `'Could not initialize images API; you are likely missing '
'the Python "PIL" module. ImportError: %s', e
If you are getting this message then the images service RPC is not being registered (the RegisterStub call in dev_appserver will be failing) and you will get the error you are seeing, because the assertion fails in CreateRPC call.
So check to see if PIL is correctly installed for Python 2.7

Categories