[google-appengine] Re: SDK Upgrade 1.5.2: --datastore_path ignored?

2011-07-23 Thread Cat

SOLUTION


1. USE --default_partition= BUT DO NOT INCLUDE THE QUOTES as mentioned
in Matthew's post.
2. IGNORE THE INCORRECT LOG MESSAGE ... rdbms_sqlite.py:58] Connecting
to SQLite database ...

LauncherFlags:
--datastore_path=/Users/cat/repositories/appengine/my.datastore --
default_partition=

Console Flags:
dev_appserver.py --datastore_path=/Users/cat/repositories/appengine/
my.datastore --default_partition= -p 8080 .

That's it.

On 23 Jul., 09:25, Cat  wrote:
> One thing I know for sure now is that the following log message is
> bogus, it appears even if dev_appserver.py successfully connects and
> uses a store at a different location than the TMP directory.
> INFO     2011-07-23 07:22:11,762 rdbms_sqlite.py:58] Connecting to
> SQLite database '' with file '/var/folders/u5/u5xmrm5gHPGXhfjlyv98u+++
> +TI/-Tmp-/dev_appserver.rdbms'

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] Re: SDK Upgrade 1.5.2: --datastore_path ignored?

2011-07-23 Thread Cat
One thing I know for sure now is that the following log message is
bogus, it appears even if dev_appserver.py successfully connects and
uses a store at a different location than the TMP directory.
INFO 2011-07-23 07:22:11,762 rdbms_sqlite.py:58] Connecting to
SQLite database '' with file '/var/folders/u5/u5xmrm5gHPGXhfjlyv98u+++
+TI/-Tmp-/dev_appserver.rdbms'

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] Re: SDK Upgrade 1.5.2: --datastore_path ignored?

2011-07-22 Thread Cat
I have tried to restore the datastore and the
GoogleAppEngineLauncher.app (with the SDK bundle inside) back to 1.5.0
but I cannot get it to run.
Its always the same error, as if the "downgrade" did not change the
python files.
Does anyone know how to get the SDK-version out of the running
appserver (a --version flag is missing!)?

On 22 Jul., 16:21, oakmad  wrote:
> +1 for me. I have tried deleting the application plist as detailed in
> this 
> issuehttp://code.google.com/p/googleappengine/issues/detail?id=1187&q=data...
> but no joy.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] Re: SDK Upgrade 1.5.2: --datastore_path ignored?

2011-07-22 Thread Cat
Update: (I'm going nuts)
I downgraded to 1.5.1 (restored GoogleAppEngineLauncher.app) and still
the same now ...
It seems that the upgrade to 1.5.2 did some permanent damage.
I am absolutely puzzled why --datastore_path= is ignored suddenly.

Here the full startup log:

cat$ /Applications/GoogleAppEngineLauncher.app/Contents/Resources/
GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
dev_appserver.py -d --datastore_path=/Users/cat/repositories/appengine/
my.datastore -p 8080 .
INFO 2011-07-22 09:15:00,330 appengine_rpc.py:159] Server:
appengine.google.com
INFO 2011-07-22 09:15:21,578 rdbms_sqlite.py:58] Connecting to
SQLite database '' with file '/var/folders/u5/u5xmrm5gHPGXhfjlyv98u+++
+TI/-Tmp-/dev_appserver.rdbms'
INFO 2011-07-22 09:15:21,618 dev_appserver_multiprocess.py:637]
Running application test on port 8080: http://localhost:8080

On 22 Jul., 09:22, Cat  wrote:
> Hi,
>
> After today's upgrade my datastore is empty and my testdata is not
> available.
>
> I start my SDK Server like this (usually with the MacOS Launcher):
> dev_appserver.py --datastore_path=/Users/cat/repositories/appengine/
> my.datastore -p8080 .
>
> Strangely --datastore_path is ignored and the dev_appserver uses a new
> datastore in the tmp directory:
> INFO     2011-07-22 07:11:11,606 rdbms_sqlite.py:58] Connecting to
> SQLite database '' with file '/var/folders/u5/u5xmrm5gHPGXhfjlyv98u+++
> +TI/-Tmp-/dev_appserver.rdbms'
>
> Can anyone tell me which flags to set to get my old test datastore
> back?
>
> I would have to create lots of testdata manually that accumlated over
> the last months.
>
> Regards,
> Cat

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] SDK Upgrade 1.5.2: --datastore_path ignored?

2011-07-22 Thread Cat
Hi,

After today's upgrade my datastore is empty and my testdata is not
available.

I start my SDK Server like this (usually with the MacOS Launcher):
dev_appserver.py --datastore_path=/Users/cat/repositories/appengine/
my.datastore -p8080 .

Strangely --datastore_path is ignored and the dev_appserver uses a new
datastore in the tmp directory:
INFO 2011-07-22 07:11:11,606 rdbms_sqlite.py:58] Connecting to
SQLite database '' with file '/var/folders/u5/u5xmrm5gHPGXhfjlyv98u+++
+TI/-Tmp-/dev_appserver.rdbms'

Can anyone tell me which flags to set to get my old test datastore
back?

I would have to create lots of testdata manually that accumlated over
the last months.

Regards,
Cat

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] Re: Server Error (500) while uploading index definitions (again)

2009-06-23 Thread Cat

Ok, when uploading version 2 and after deleting version 122 I could
trace the Error back to a circular import that did not show when
running locally.

On 23 Jun., 18:05, Cat  wrote:
> Ok, the error traces back to an import error on the "Logs" menu
> probably my fault.
> I am investigating because the local app did not show this error ...
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Server Error (500) while uploading index definitions (again)

2009-06-23 Thread Cat

Ok, the error traces back to an import error on the "Logs" menu
probably my fault.
I am investigating because the local app did not show this error ...
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Server Error (500) while uploading index definitions (again)

2009-06-23 Thread Cat

I just tried to deploy a new version and bumped its version number
from 1 to 122 (the svn number).
Now access to 122.latest...appspot.com results in a 500 Server Error
while my 1.latest... version works fine.

Some changes:
The index.yaml has not changed (except reference counts) and there
should not be a need for a new index. Some DBs do not occur in the
index (accessed by keyword & parent only).
I have changed one existing db.Model from package dbmodels to
iconmanager

application/octet-stream.
Cloning 88 static files.
Cloning 56 application files.
Uploading 26 files.
Deploying new version.
Checking if new version is ready to serve.
Will check again in 1 seconds.
Checking if new version is ready to serve.
Will check again in 2 seconds.
Checking if new version is ready to serve.
Closing update: new version is ready to start serving.
Uploading index definitions.
Error 500: --- begin server output ---

Server Error (500)
A server error has occurred.
--- end server output ---
Your app was updated, but there was an error updating your indexes.
Please retry later with appcfg.py update_indexes.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Hidden Security Risks through App Caching

2008-09-15 Thread Cat

Well the issue here is more of a design pattern issue ...

How can you create error/warning/success messages at any time in the
code that are displayed on the next page without using static
variables. I do not know a solution.

Does anyone know if appengine uses a single instance reentrant (e.g. a
second request is processed by the same instance before the first
terminates?) This would prohibit any use of statics at all.

On 10 Sep., 22:41, Olli117 <[EMAIL PROTECTED]> wrote:
> I think it's a feature of the python syntax that all instance
> attributes have to be referenced by self. In Java you get the help
> from eclipse to mark class variables (by writing them italic).
> Otherwise it coud be difficult to recognize them, too.

The pretty unique feature of Python is to use class variables as
prototype for instance variables. This is a feature like in
prototypical languages (JavaScript.) All instance variables have to be
declared in __init__(self). Java/C++/PHP programmers might explore
those Pitfalls at first probably often just because "the wrong thing
looks right" to them.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: dev_appserver.py doesn't create index.yaml and manual index.yaml isn't recognized

2008-09-10 Thread Cat

I think the dev appserver does not create indexes if run in strict
mode.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Hidden Security Risks through App Caching

2008-09-10 Thread Cat

> Your example code isn't declaring message as a global variable, and it
> won't be cached. It's really difficult to accidentally use the global 
> statement.

I exactly thought the same thing as you until I noticed messages from
one Page instance showing up in another across requests! Here it says
why: http://docs.python.org/ref/class.html

In Python all variables declared in a class are IMPLICITLY class-
variables and thus static/shared!  You do not need the global
statement this way. People coming from Java/PHP/C++ might expect that
these variables are instance variables. Its also convenient to use
these as defauts for instance variables.

Programmer's note: Variables defined in the class definition are class
variables; they are shared by all instances. To define instance
variables, they must be given a value in the __init__() method or in
another method.

Paste this into your Python console to see how to create a static
variable without "global" statement.
# EXAMPLE 1: #
class Page():
  message = 'hello'

# could be an error message to be inserted into any next page that
will be creaed
Page.message += " world" # Notice: Page, not p
p = Page()
print p.message

# next request retrieves the error message of the previous request
q = Page()
print q.message

## EXAMPLE 2: ##
class Page():
  messages = ['hello']
  def __init__(self):
self.messages.append(" world") # APPEND TO STATIC CONTEXT


# could be an error message to be inserted into any next page that
will be creaed
p = Page()
print p.messages

# next request retrieves the error message of the previous request
q = Page()
print q.messages

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Hidden Security Risks through App Caching

2008-09-09 Thread Cat

Hmm,

I noticed that in contrary to ordinary webservers AppEngine preserves
global state of one instance. This has huge security implications, as
sensitive information could be leaked through class variables:

Example pattern:

class Page(...):
  message = ''
  def render(response): # output the page
response.out.write(Page.message) # any message?

# ... lets do the BAD thing ...
Page.message = 'Hello mike! You have changed your password to
aT455gv.'

[... exception here ...]

p = Page(title=''Hello")
p.render(...)

If the next user connects the message is displayed to the following
user ... UhOh!
Preserved state is new thing one has to get used to ...

Hmm, there is a tiny note about this here:
http://code.google.com/appengine/docs/python/appcaching.html

Could that be displayed in BOLD RED FLASHING for all newbies out
there?

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Query against EnitiyGroup that returns a list of Objects of various kinds/types? (Factory Pattern)

2008-09-08 Thread Cat

I am using a factory pattern to model my data. Creating the data is
simple. Retrieving it is hard.

class Owner()
class Base(db.Model)
 group = StringProperty(default="abc")
@classmethod
def factory(): ...
class Sub1(Base)
class Sub2(Base)

Problem: I want to query for all classes with ancestor == owner (and
group == 'abc').
So to say run a query against a whole entity group. However it appears
I can only retrieve a "Kind"/Class at a time?

Base.all().ancestor(owner).fetch(100) will only return Base instances
not Sub1 and Sub2
Sub1.all().ancestor(owner).fetch(100) will only return Sub1s

Question: Is there any query that could return mixed type lists?

Some solutions I can think of is
* to add a 1000 item ListProperty(RefereneProperty) to Owner ... needs
to be filtered manually by group (slow?)
* to use Base(Expando) with a type property instead using
subclasses ... loose some prop checking

Is there a better way to do that?

Thanks,
Thomas

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] [Help]Cant create app engine account !

2008-09-03 Thread Lazi Cat

Plz help me !
My country is Viet Nam, and at present, it is not supported to verify
acc via SMS
But I really want to try this new service, since my current major is
IT

What should I do ? :(

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---