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

  • SEARCH
  • Home
  • 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 8266271
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T05:05:51+00:00 2026-06-08T05:05:51+00:00

My GAE Python app has a kind called User, with various custom fields. Recently,

  • 0

My GAE Python app has a kind called “User”, with various custom fields. Recently, when my app has no activity overnight, I will get an error when I try to log in the next morning.

During login, I get an id (from Facebook) which is the key_name for the entity in the Datastore:

    user = User.get_by_key_name(id_from_facebook)
    logging.debug(user.favorite_color)

This causes an error because the entity returned is actually some class from the google library, and therefore doesn’t have the field “favorite_color”. However, it is getting “something” from the datastore, so I checked the object’s contents:

    for key in user.__dict__.keys():
      log.debug("%s: %s" % (key, user.__dict__[key]))

This shows keys that aren’t in my “User” kind, like “_first_name”, “_last_name”, and “_email”.

I also tried importing my class from “myapp.models” inside the method instead of at the top of the file, but nothing changed. Once I shutdown the instance running on GAE and access my app again to start an new instance, however, it works fine.

My only clue was that I have heard about there being a discrepancy between what my app imports and what GAE imports, but nothing else. Is there anything I can do besides copying all of my users into a new, unique type (like “MyUser”)?

EDIT:

I found that the undesired class was actually “User” from Kay Framework, which is also in my project. However, I don’t import that class anywhere in my code, especially not in the module where the error is occurring.

  • 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-06-08T05:05:54+00:00Added an answer on June 8, 2026 at 5:05 am

    You’re probably importing the User class from google.appengine.api.users.

    Fortunately, Python makes this sort of thing easy to track down, because imports are explicit. Just check your import lines at the top of your module, and determine where that object is coming from.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using Google Engine App with Python. I want to add custom user authentication.
I recently upgraded my GAE Python app to Python 2.7. Since then, I periodically
I've recently started developing my first web app with GAE and Python, and it
I'm currently porting my GAE app to Python 2.7 and have come across some
In Python and GAE, I would like to ask how to get the parameters
My devserver has become hideously slow for some reason. (Python, Windows 7, GAE 1.3.3)
I am writing an app using python on GAE. I figure since I'm using
I would like to provide my Python GAE website in the user's own language,
I'm working on a GAE Python app for running elections. I have an Election
I'm migrating my gae app to python 2.7. This is my new app.yaml: application:

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.