natea / django-deployer

Deployment tool for Django that automatically generates the configuration to deploy your project to various PaaS providers.
http://natea.github.io/django-deployer
MIT License
150 stars 19 forks source link

BadArgumentError: app must not be empty in first time sync cloud sql db #16

Open littleq0903 opened 11 years ago

littleq0903 commented 11 years ago

I don't know how this happened, it seems like somewhere lacked the appid.

here's one solution needs to be verified: BadArgumentError

I will deal with it later.

Error message as below:

Would you like to install some initial content? Eg: About page, Blog, Contact form, Gallery. (yes/no): yes

Creating initial content (About page, Blog, Contact form, Gallery) ...

Installed 18 object(s) from 3 fixture(s) Traceback (most recent call last): File "mywebsite/manage.py", line 28, in execute_from_command_line(sys.argv) File "/usr/local/google_appengine/lib/django-1.4/django/core/management/init.py", line 443, in execute_from_command_line utility.execute() File "/usr/local/google_appengine/lib/django-1.4/django/core/management/init.py", line 382, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/usr/local/google_appengine/lib/django-1.4/django/core/management/base.py", line 196, in run_from_argv self.execute(_args, _options.dict) File "/usr/local/google_appengine/lib/django-1.4/django/core/management/base.py", line 232, in execute output = self.handle(_args, _options) File "/usr/local/google_appengine/lib/django-1.4/django/core/management/base.py", line 371, in handle return self.handle_noargs(_options) File "/usr/local/google_appengine/lib/django-1.4/django/core/management/commands/syncdb.py", line 110, in handle_noargs emit_post_sync_signal(created_models, verbosity, interactive, db) File "/usr/local/google_appengine/lib/django-1.4/django/core/management/sql.py", line 189, in emit_post_sync_signal interactive=interactive, db=db) File "/usr/local/google_appengine/lib/django-1.4/django/dispatch/dispatcher.py", line 172, in send response = receiver(signal=self, sender=sender, _named) File "/Users/littleq/github/paasbakeoff/env/lib/python2.7/site-packages/mezzanine/core/management/init.py", line 56, in create_pages gallery.save() File "/Users/littleq/github/paasbakeoff/env/lib/python2.7/site-packages/mezzanine/galleries/models.py", line 53, in save zip_file = ZipFile(self.zip_import) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/zipfile.py", line 712, in init self._GetContents() File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/zipfile.py", line 746, in _GetContents self._RealGetContents() File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/zipfile.py", line 757, in _RealGetContents endrec = _EndRecData(fp) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/zipfile.py", line 203, in _EndRecData fpin.seek(0, 2) File "/usr/local/google_appengine/lib/django-1.4/django/core/files/utils.py", line 20, in seek = property(lambda self: self.file.seek) File "/usr/local/google_appengine/lib/django-1.4/django/db/models/fields/files.py", line 46, in _get_file self._file = self.storage.open(self.name, 'rb') File "/usr/local/google_appengine/lib/django-1.4/django/core/files/storage.py", line 33, in open return self._open(name, mode) File "/Users/littleq/github/paasbakeoff/mywebsite/../env/lib/python2.7/site-packages/rocket_engine/storage.py", line 27, in _open blobstore_key = blobinfo[0].key()._BlobKeyblob_key File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/ext/db/init.py", line 2282, in getitem results = self.fetch(1, arg) File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/ext/db/init.py", line 2157, in fetch return list(self.run(limit=limit, offset=offset, kwargs)) File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/ext/db/init**.py", line 2075, in run raw_query = self._get_query() File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/ext/db/init__.py", line 2480, in _get_query _app=self._app) File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/api/datastore.py", line 1320, in init self.__app = datastore_types.ResolveAppId(_app) File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/api/datastore_types.py", line 225, in ResolveAppId ValidateString(app, 'app', datastore_errors.BadArgumentError) File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/api/datastore_types.py", line 173, in ValidateString raise exception('%s must not be empty.' % name) google.appengine.api.datastore_errors.BadArgumentError: app must not be empty.

littleq0903 commented 11 years ago

Okay, after applying that solution, the problem becomes different...

that won't affect the production, seems like some error from dev_appserver.


Creating initial content (About page, Blog, Contact form, Gallery) ...

Installed 18 object(s) from 3 fixture(s) Traceback (most recent call last): File "mywebsite/manage.py", line 28, in execute_from_command_line(sys.argv) File "/usr/local/google_appengine/lib/django-1.4/django/core/management/init.py", line 443, in execute_from_command_line utility.execute() File "/usr/local/google_appengine/lib/django-1.4/django/core/management/init.py", line 382, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/usr/local/google_appengine/lib/django-1.4/django/core/management/base.py", line 196, in run_from_argv self.execute(_args, _options.dict) File "/usr/local/google_appengine/lib/django-1.4/django/core/management/base.py", line 232, in execute output = self.handle(_args, _options) File "/usr/local/google_appengine/lib/django-1.4/django/core/management/base.py", line 371, in handle return self.handle_noargs(options) File "/usr/local/google_appengine/lib/django-1.4/django/core/management/commands/syncdb.py", line 110, in handle_noargs emit_post_sync_signal(created_models, verbosity, interactive, db) File "/usr/local/google_appengine/lib/django-1.4/django/core/management/sql.py", line 189, in emit_post_sync_signal interactive=interactive, db=db) File "/usr/local/google_appengine/lib/django-1.4/django/dispatch/dispatcher.py", line 172, in send response = receiver(signal=self, sender=sender, _named) File "/Users/littleq/github/paasbakeoff/env/lib/python2.7/site-packages/mezzanine/core/management/init.py", line 56, in create_pages gallery.save() File "/Users/littleq/github/paasbakeoff/env/lib/python2.7/site-packages/mezzanine/galleries/models.py", line 53, in save zip_file = ZipFile(self.zip_import) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/zipfile.py", line 712, in init self._GetContents() File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/zipfile.py", line 746, in _GetContents self._RealGetContents() File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/zipfile.py", line 757, in _RealGetContents endrec = _EndRecData(fp) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/zipfile.py", line 203, in _EndRecData fpin.seek(0, 2) File "/usr/local/google_appengine/lib/django-1.4/django/core/files/utils.py", line 20, in seek = property(lambda self: self.file.seek) File "/usr/local/google_appengine/lib/django-1.4/django/db/models/fields/files.py", line 46, in _get_file self._file = self.storage.open(self.name, 'rb') File "/usr/local/google_appengine/lib/django-1.4/django/core/files/storage.py", line 33, in open return self._open(name, mode) File "/Users/littleq/github/paasbakeoff/mywebsite/../env/lib/python2.7/site-packages/rocket_engine/storage.py", line 27, in _open blobstore_key = blobinfo[0].key()._BlobKeyblob_key File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/ext/db/init__.py", line 2282, in getitem results = self.fetch(1, arg) File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/ext/db/init.py", line 2157, in fetch return list(self.run(limit=limit, offset=offset, _kwargs)) File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/ext/db/init.py", line 2076, in run iterator = raw_query.Run(kwargs) File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/api/datastore.py", line 1650, in Run itr = Iterator(self.GetBatcher(config=config)) File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/api/datastore.py", line 1629, in GetBatcher return self.GetQuery().run(_GetConnection(), query_options) File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/datastore/datastore_query.py", line 1745, in run return Batcher(query_options, self.run_async(conn, query_options)) File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/datastore/datastore_query.py", line 1902, in run_async start_cursor=start_cursor) File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/datastore/datastore_rpc.py", line 95, in positional_wrapper return wrapped(_args, *_kwds) File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/datastore/datastore_query.py", line 2330, in create_async return batch0._make_query_result_rpc_call('RunQuery', query_options, req) File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/datastore/datastore_query.py", line 2521, in _make_query_result_rpc_call self.query_result_hook) File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/datastore/datastore_rpc.py", line 1195, in make_rpc_call rpc = self.create_rpc(config) File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/datastore/datastore_rpc.py", line 1117, in create_rpc rpc = apiproxy_stub_map.UserRPC('datastore_v3', deadline, callback) File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/api/apiproxy_stub_map.py", line 405, in init self.rpc = CreateRPC(service, stubmap) File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/api/apiproxy_stub_map.py", line 67, in CreateRPC assert stub, 'No api proxy found for service "%s"' % service AssertionError: No api proxy found for service "datastore_v3"