Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Loaddata broken on AppEngine 1.6.4 #26

Closed
aroscoe opened this Issue · 9 comments

3 participants

@aroscoe

Since upgrading to AppEngine 1.6.4 ./manage.py loaddata no longer works. Downgrading back to 1.6.3 and it works again. Here's the output in AE 1.6.4:

./manage.py loaddata test_fixtures.json 
WARNING:root:The rdbms API is not available because the MySQLdb library could not be loaded.
WARNING:root:Could not read datastore data from /Users/aroscoe/Projects/project/my-app/.gaedata/datastore
@aburgel
Owner

have you tried deleting your current datastore and trying again? or perhaps you could provide some more info. its hard to diagnose with what you've provided.

@aroscoe

If I delete my .gaedata folder then run syncdb .gaedata will be created and everything, but when I call loaddata after that none of my fixture data will be loaded into the database even though it says it has. In AE 1.6.3 the messages from loaddata are slightly different and it works. Below is the output for each AppEngine version:

AppEngine 1.6.4

/manage.py loaddata test_fixtures.json 
WARNING:root:The rdbms API is not available because the MySQLdb library could not be loaded.
WARNING:root:Could not read datastore data from /Users/aroscoe/Projects/project/my-app/.gaedata/datastore
Installed 135 object(s) from 1 fixture(s)

AppEngine 1.6.3

./manage.py loaddata test_fixtures.json 
WARNING:root:The rdbms API is not available because the MySQLdb library could not be loaded.
Installed 135 object(s) from 1 fixture(s)
Exception AttributeError: "'NoneType' object has no attribute 'mkstemp'" in <bound method DatastoreFileStub.__del__ of <google.appengine.api.datastore_file_stub.DatastoreFileStub object at 0x10a5a8d50>> ignored
@aburgel
Owner

how are your db settings configured in settings.py?

@aroscoe
DATABASES['native'] = DATABASES['default']
DATABASES['default'] = {'ENGINE': 'dbindexer', 'TARGET': 'native'}

if 'DATASTORE_PATH' in os.environ:
    DATABASES['default']['datastore_path'] = os.environ['DATASTORE_PATH']

DATABASES['default']['DOMAIN'] = 'my-app-domain.com'
@aburgel
Owner

not sure if changing the datastore path like that is a good idea. are you setting 'DATASTORE_PATH' in your environment?

@aroscoe

I commented it out and ran everything again with no luck.

FYI, I need that so when I run tests in selenium it sets a different datastore. I'm only setting DATASTORE_PATH when I recognize I am running a special selenium command from manage.py.

@dragonx

loaddata seems to work for me.

I suspect it's related to this issue where the datastore doesn't save on exit:
#25

@aburgel
Owner

since 1.6.5 was just released, could you give that a shot to see if this issue is fixed? if not, i'll take another look and see if the patch from @dragonx should be applied.

@aroscoe

Hooray! It's working on 1.6.5. Thanks for all your help.

@aroscoe aroscoe closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.