kholioeg
kholioeg

Reputation: 1

users class in google apps engine 1.8

After upgrading to latest python gae-1.8, I got the following error on appspot.com:

AttributeError: 'NoneType' object has no attribute 'email'

The same code working fine from dev server.

The actual code is:

entity.username = users.GetCurrentUser().email()

I tried the original get_current_user() function but got the same.

The application is not public. it has been configured to work only from specific Apps domain. Also it was working fine on 1.7.5 version.

And I use one account only to avoid multiple accounts issues.

Appreciate your help.

Upvotes: 0

Views: 76

Answers (1)

Tim Hoffman
Tim Hoffman

Reputation: 12986

The docs for get_current_user() says

get_current_user() Returns the User object for the current user (the user who made the request being processed) if the user is signed in, or None if the user is not signed in

Given your error is AttributeError: 'NoneType' object has no attribute 'email' then the user is not logged in and the call is returning None.

I am using auth with a specific app domain, and everything is working fine. So I don't believe it is a general runtime (1.8.0) issue.

Upvotes: 2

Related Questions