Search code examples
pythongoogle-cloud-datastore

Google Cloud Datastore, mismatched databases within request


I'm using google cloud datastore and I've got a problem with switching projects.

When I changed the project and account in Google Cloud Console.

I tried a lot of things to solve it. Re-install everything: Google Cloud SDK, re-clone repo
Error the same

grpc_message":"mismatched databases within request: <unknown!>~NEW_PROJECT_NAME vs. <unknown!>~OLD_PROJECT_NAME","grpc_status":3}

Solution

  • I found the solution. I had cached ndb keys and they had been used with new project environment. After I had cleaned the cache everything started working fine.