I have an update regarding this question.
After i changed these lines, i'm getting a step further:
if not request.env.web2py_runtime_gae:
## if NOT running on Google App Engine use SQLite or other DB
db = DAL('sqlite://storage.sqlite',pool_size=1,check_reserved=['all'])
else:
## connect to Google BigTable (optional 'google:datastore://namespace')
db = DAL('google:datastore')
to:
db = DAL('google:datastore')
I got this error:
Traceback (most recent call last):
File "X:\GAE\*******\gluon\restricted.py", line 217, in restricted
exec ccode in environment
File "applications\init\models\menu.py", line 32, in <module>
categories = db(db.category).select(orderby=db.category.name, cache=(cache.r
am, 60))
File "X:\GAE\*******\gluon\dal.py", line 10403, in select
return adapter.select(self.query,fields,attributes)
File "X:\GAE\*******\gluon\dal.py", line 4995, in select
for t in fields] for item in items]
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\ext\db\_
_init__.py", line 2094, in __iter__
return self.run()
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\ext\db\_
_init__.py", line 2075, in run
raw_query = self._get_query()
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\ext\db\_
_init__.py", line 2480, in _get_query
_app=self._app)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\api\data
store.py", line 1343, in __init__
self.__app = datastore_types.ResolveAppId(_app)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\api\data
store_types.py", line 225, in ResolveAppId
ValidateString(app, 'app', datastore_errors.BadArgumentError)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\api\data
store_types.py", line 173, in ValidateString
raise exception('%s must not be empty.' % name)*BadArgumentError: app must
not be empty.*
This error occurs because GAE needs the APPLICATION_ID os environ to be set.
I had some db operations in my menu.py model and when i removed that code i
could successfully start the web2py shell.
But i cannot do any db queries from the shell because of the missing
APPLICATION_ID environ.
How can i make this work?
Thanks!
On Sunday, June 16, 2013 10:33:40 AM UTC+2, Massimo Di Pierro wrote:
>
> Please open a ticket. This is supposed to work, with quirks, but it should
> work.
>
> On Wednesday, 12 June 2013 12:20:16 UTC-5, Quint wrote:
>>
>> Hello,
>>
>> I'm trying to use the interactive shell with the GAE dev server on
>> Windows.
>> Wahet do i need to do to getthis working?
>>
>> I'm now getting this error 5 times:
>>
>> web2py Web Framework
>> Created by Massimo Di Pierro, Copyright 2007-2013
>> Version 2.4.7-stable+timestamp.2013.05.24.17.48.47
>> Database drivers available: SQLite(sqlite3), PostgreSQL(pg8000),
>> MSSQL(pyodbc),
>> DB2(pyodbc), Teradata(pyodbc), Ingres(pyodbc), CouchDB(couchdb),
>> IMAP(imaplib)
>> DEBUG: connect attempt 0, connection error:
>> Traceback (most recent call last):
>> File "C:\Users\*************\gluon\dal.py", line
>> 7429, in __init__
>> self._adapter = ADAPTERS[self._dbname](**kwargs)
>> File "*************\gluon\dal.py", line
>> 2220, in __init__
>> if do_connect: self.reconnect()
>> File "C:\Users\*************\gluon\dal.py", line
>> 603, in reconnect
>> self.connection = f()
>> File "C:\Users\*************\gluon\dal.py", line
>> 2218, in connector
>> return self.driver.Connection(dbpath, **driver_args)
>> OperationalError: unable to open database file
>>
>>
>> I'v tried adding this folder to my PATH with the GAE modules.
>>
>> PATH=%PATH%;C:\Program Files
>> (x86)\Google\google_appengine\google\appengine\ext
>>
>> Thanks!
>>
>>
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.