django loaddata fails

745 views
Skip to first unread message

ken keller

unread,
Apr 29, 2009, 11:07:20 PM4/29/09
to Google App Engine
I confess I haven't used fixtures before. My hierarchy is:

collectrium-splash
models.py: Contains the model Period.
fixtures
period.yaml

First of all, it seems odd that:

python manage.py loaddata period.yaml

doesn't find the fixtures directory so I tried:

python manage.py loaddata fixtures/period.yaml

which yields this stk trace:

WARNING:root:Could not read datastore data from /tmp/
django_collectrium-splash.datastore
WARNING:root:Could not read datastore data from /tmp/
django_collectrium-splash.datastore.history
INFO:root:zipimporter('/home/notcourage/swe/collectrium-splash/
django.zip', 'django/core/serializers/')
Installing yaml fixture 'fixtures/period' from absolute path.
Problem installing fixture 'fixtures/period.yaml': Traceback (most
recent call last):
File "/home/notcourage/swe/collectrium-splash/django.zip/django/core/
management/commands/loaddata.py", line 116, in handle
for obj in objects:
File "/home/notcourage/swe/collectrium-splash/django.zip/django/core/
serializers/pyyaml.py", line 49, in Deserializer
for obj in PythonDeserializer(yaml.load(stream)):
File "/home/notcourage/swe/collectrium-splash/appengine_django/
serializer/python.py", line 59, in Deserializer
Model = python._get_model(d["model"])
File "/home/notcourage/swe/collectrium-splash/django.zip/django/core/
serializers/python.py", line 107, in _get_model
raise base.DeserializationError(u"Invalid model identifier: '%s'"
% model_identifier)
DeserializationError: Invalid model identifier: 'collectrium-
splash.period'

Thx for your help.

Tim Hoffman

unread,
Apr 30, 2009, 12:37:17 AM4/30/09
to Google App Engine
Reading the traceback I think the '-' in the name might be causing you
a problem
You would not be able to have a python name (ie module name variable
etc..)
with '-' . The parser won't be able distinguish between - operator /
expression and your name.

That might be it

T

ken keller

unread,
Apr 30, 2009, 9:40:54 AM4/30/09
to Google App Engine
Happens when I omit the app name too.
DeserializationError: Invalid model identifier: 'period'
Reply all
Reply to author
Forward
0 new messages