Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6771661
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T15:27:30+00:00 2026-05-26T15:27:30+00:00

Following these instructions: http://neogregious.blogspot.com/2011/04/migrating-app-to-high-replication.html I have managed to migrate to the high replication datastore

  • 0

Following these instructions:
http://neogregious.blogspot.com/2011/04/migrating-app-to-high-replication.html

I have managed to migrate to the high replication datastore however I am now getting the following exception:

datastore_errors.BadArgumentError('ancestor argument should match app ("%r" != "%r")' %
        (ancestor.app(), app))

The model data looks something like this:

class base_business(polymodel.PolyModel):
  created = db.DateTimeProperty(auto_now_add=True)

class business(base_business):
  some_data = db.StringProperty()
  etc..

class business_image(db.Model):
  image = db.BlobProperty(default=None)
  mimetype = db.StringProperty()
  comment = db.StringProperty(required=False)

# the image is associated like so
image_item = business_image(parent = business_item, etc... )
image_item.put()  

The new app name has not been assigned to the ancestor model data. At the moment the data is returned however the logs are being populated with this exception message.

The actual stack trace using logging.exception:

2011-11-03 16:45:40.211
======= get_business_image exception [ancestor argument should match app (“‘oldappname'” != “‘s~newappname'”)] =======
Traceback (most recent call last):
File “/base/data/home/apps/s~newappname/3.354412961756003398/oldappname/entities/views.py”, line 82, in get_business_image
business_img = business_image.gql(“WHERE ANCESTOR IS :ref_business and is_primary = True”, ref_business = db.Key(business_key)).get()
File “/base/python_runtime/python_lib/versions/1/google/appengine/ext/db/init.py”, line 2049, in get
results = self.fetch(1, config=config)
File “/base/python_runtime/python_lib/versions/1/google/appengine/ext/db/init.py”, line 2102, in fetch
raw = raw_query.Get(limit, offset, config=config)
File “/base/python_runtime/python_lib/versions/1/google/appengine/api/datastore.py”, line 1668, in Get
config=config, limit=limit, offset=offset, prefetch_size=limit))
File “/base/python_runtime/python_lib/versions/1/google/appengine/api/datastore.py”, line 1600, in GetBatcher
return self.GetQuery().run(_GetConnection(), query_options)
File “/base/python_runtime/python_lib/versions/1/google/appengine/api/datastore.py”, line 1507, in GetQuery
order=self.GetOrder())
File “/base/python_runtime/python_lib/versions/1/google/appengine/datastore/datastore_rpc.py”, line 93, in positional_wrapper
return wrapped(*args, **kwds)
File “/base/python_runtime/python_lib/versions/1/google/appengine/datastore/datastore_query.py”, line 1722, in init
ancestor=ancestor)
File “/base/python_runtime/python_lib/versions/1/google/appengine/datastore/datastore_rpc.py”, line 93, in positional_wrapper
return wrapped(*args, **kwds)
File “/base/python_runtime/python_lib/versions/1/google/appengine/datastore/datastore_query.py”, line 1561, in init
(ancestor.app(), app))
BadArgumentError: ancestor argument should match app (“‘oldappname'” != “‘s~newappname'”)

Is there a way to manually set the app on the model data? Could I do something like this to resolve this?

if( ancestor.app() != app )
  set_app('my_app')
  put()

Before I do this or apply any other HACK is there something I should have done as part of the data migration?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T15:27:31+00:00Added an answer on May 26, 2026 at 3:27 pm

    This sort of error usually occurs because you’re using fully qualified keys somewhere that have been stored in the datastore as strings (instead of ReferenceProperty), or outside the datastore, such as in URLs. You should be able to work around this by reconstructing any keys from external sources such that you ignore the App ID, something like this:

    my_key = db.Key.from_path(*db.Key(my_key).to_path())
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to follow these instructions: http://source.android.com/source/downloading.html I have set up a fresh
I am following these instructions to attempt to build V8 on Mac Lion: http://code.google.com/apis/v8/build.html
I made an app following these instructions http://www.ifans.com/forums/showthread.php?t=132024 And was great, but now, Now,
I have created a WCF Client with the SVCUTIL.exe following these instructions : http://msdn.microsoft.com/en-us/library/ms733133.aspx
I am following these instructions: http://developer.android.com/guide/market/billing/billing_integrate.html#billing-download and they say to open the Android SDK
I am following these instructions: http://blog.mackerron.com/2009/05/19/paste-unformatted-keyboard-shortcut-office-2008-mac/ Worked fine in Word. But when i paste
Following these instructions http://robertogds.com/post/3324511589/howto-backbone-js-using-rails-3 The issue/error is that the content is never saved to
I'm installing Satchmo following these instructions: http://forum.webfaction.com/viewtopic.php?pid=10579#p10579 When I want to check my installation,
After following these steps: http://developers.facebook.com/docs/mobile/android/build/ I find that everything goes well, but when I
So I'm following these instructions: http://mark-kirby.co.uk/2008/using-git-and-github-on-os-x , and so far I've cloned the project

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.