No module named google.appengine.api

258 views
Skip to first unread message

stace

unread,
Dec 22, 2009, 8:28:16 PM12/22/09
to AppRocket
I'm still having trouble finding the log, but when I run the daemon.py
from the command line, I get this error

C:\Python25>python c:\gae\app\rocket\daemon.py
Traceback (most recent call last):
File "c:\gae\app\rocket\daemon.py", line 190, in <module>
run_services(in_loop)
File "c:\gae\app\rocket\daemon.py", line 114, in run_services
exec "from %s import %s" % (service_package, service_class)
File "<string>", line 1, in <module>
File "c:\gae\app\rocket\rocket.py", line 19, in <module>
from google.appengine.api import datastore, datastore_types,
datastore_errors

ImportError: No module named google.appengine.api

stace

unread,
Dec 22, 2009, 9:15:55 PM12/22/09
to AppRocket
I should add that the above error occurs when I have the MODE set to
RECEIVE_SEND

Now when I change to SEND_RECEIVE, I get this error:

Traceback (most recent call last):

File "c:\gae\app\rocket\daemon.py", line 51, in <module>
exec import_config


File "<string>", line 1, in <module>

File "c:\gae\app\rocket\config.py", line 19, in <module>
"ReplicateLevel": {TYPE: REPLICATION_SERVICE, KIND: "Level", MODE:
SEND_RECEIVE, TIMESTAMP_FIELD: "modified_at", RECEIVE_FIELDS: ["k",
+"name", "number", "c
reated_at"],},
TypeError: bad operand type for unary +: 'str'

stace

unread,
Dec 22, 2009, 9:22:08 PM12/22/09
to AppRocket
Ah that last error was my fault; a typo as I've been trying all kinds
of things in the config file to try and see where the problem is and
what may solve it.

The missing module error is the one I get for every type of MODE.

Kaspars

unread,
Dec 23, 2009, 6:02:35 AM12/23/09
to AppRocket
1) You should have folder where daemon.py is located as the current
folder (just navigate to it via command prompt)
2) What parameters do you pass to daemon.py?

stace

unread,
Dec 23, 2009, 12:10:20 PM12/23/09
to AppRocket
Hello and thanks for your reply - what do you mean by parameters? I've
tried simply clicking on daemon.py - which runs it but shuts the
window before I can see any errors, and running from the python folder
like I used to do with approcket 1.0 - but I didn't try navigating
directly to the deamon.py from the command window if that's what you
mean.

stace

unread,
Dec 23, 2009, 12:12:03 PM12/23/09
to AppRocket
can you give me an example of what you mean when you say to navigate
to daemon.py via the command prompt? running the command

python daemon.py

doesn't do anything - is there another command other than "python"?

stace

unread,
Dec 23, 2009, 12:31:56 PM12/23/09
to AppRocket
ah ok i needed NOT to enter "python" first - i can run deamon.py -
errors are all gone, but no data is getting written. I emptied all
the rocket_station table so that shouldn't be stopping it - my Config
file services looks like this:


SERVICES = {
# Define replication services for entities that you want to be
replicated here.

# Example:
# "ReplicateNotAComment": {TYPE: REPLICATION_SERVICE, KIND:
"NotAComment",},
# "ReplicateComment": {TYPE: REPLICATION_SERVICE, KIND: "Comment",
EMBEDDED_LIST_FIELDS: ["list2"]},

"ReplicateLevel": {TYPE: REPLICATION_SERVICE, KIND: "Level", MODE:

RECEIVE, TIMESTAMP_FIELD: "modified_at",},

stace

unread,
Dec 23, 2009, 12:40:19 PM12/23/09
to AppRocket
ok i narrowed it down! This is a date problem.

i added a new entry to the datastore via the online admin, and
approcket transferred this and wrote the data just fine.

But I have hundreds of entries for my models that I've entered in the
past 3 months - how can I get these transferred?

stace

unread,
Dec 23, 2009, 2:02:33 PM12/23/09
to AppRocket
ok i updated all my modified_at timestamps for a table using the old
approcket, and I found that there seems to be a discrpency in the
formats - I have no idea where this is occurring, but when I updated
the entries and posted from the old approcket mysql to my local
datastore, the times got converted from this:

2009-12-23 18:48:10

to this:

2009-12-23 18:48:10.579000

And the new approcket won't write any entries for entries that have
this long timestamp version. Anybody have a clue where this could be
happening? It's someplace in my app Python code, not approcket - as I
confirmed that these times are now being entered when you use the
online admin to enter a record, and not just via mysql via approcket.

Seems my programmer did something to change our timestamps.

Reply all
Reply to author
Forward
0 new messages