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 8493799
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T23:07:17+00:00 2026-06-10T23:07:17+00:00

Im getting really frustrated with this error. After i updated to sdk 1.6.6 im

  • 0

Im getting really frustrated with this error. After i updated to sdk 1.6.6 im starting to see the following error the first time i run certain handlers.

AssertionError: Request global variable is not set.

the important part of the stacktrace

Request global variable is not set.
Traceback (most recent call last):
  File "/base/python27_runtime/python27_lib/versions/third_party/webapp2-2.5.1/webapp2.py", line 1536, in __call__
    rv = self.handle_exception(request, response, e)
  File "/base/python27_runtime/python27_lib/versions/third_party/webapp2-2.5.1/webapp2.py", line 1530, in __call__
    rv = self.router.dispatch(request, response)
  File "/base/python27_runtime/python27_lib/versions/third_party/webapp2-2.5.1/webapp2.py", line 1278, in default_dispatcher
    return route.handler_adapter(request, response)
  File "/base/python27_runtime/python27_lib/versions/third_party/webapp2-2.5.1/webapp2.py", line 1102, in __call__
    return handler.dispatch()
  File "/base/data/home/apps/s~kobstadendev/1.359392875892326983/main.py", line 81, in dispatch
    webapp2.RequestHandler.dispatch(self)
  File "/base/python27_runtime/python27_lib/versions/third_party/webapp2-2.5.1/webapp2.py", line 572, in dispatch
    return self.handle_exception(e, self.app.debug)
  File "/base/python27_runtime/python27_lib/versions/third_party/webapp2-2.5.1/webapp2.py", line 570, in dispatch
    return method(*args, **kwargs)
  File "/base/python27_runtime/python27_lib/versions/1/google/appengine/ext/ndb/tasklets.py", line 1009, in synctasklet_wrapper
    return taskletfunc(*args, **kwds).get_result()
  File "/base/python27_runtime/python27_lib/versions/1/google/appengine/ext/ndb/tasklets.py", line 322, in get_result
    self.check_success()
  File "/base/python27_runtime/python27_lib/versions/1/google/appengine/ext/ndb/tasklets.py", line 362, in _help_tasklet_along
    value = gen.send(val)
  File "/base/data/home/apps/s~kobstadendev/1.359392875892326983/items_ndb/items.py", line 439, in get
    user = self.auth.get_user_by_session()
  File "/base/python27_runtime/python27_lib/versions/third_party/webapp2-2.5.1/webapp2.py", line 726, in __get__
    value = self.func(obj)
  File "/base/data/home/apps/s~kobstadendev/1.359392875892326983/main.py", line 88, in auth
    return auth.get_auth()
  File "/base/python27_runtime/python27_lib/versions/third_party/webapp2-2.5.1/webapp2_extras/auth.py", line 623, in get_auth
    request = request or webapp2.get_request()
  File "/base/python27_runtime/python27_lib/versions/third_party/webapp2-2.5.1/webapp2.py", line 1720, in get_request
    assert getattr(_local, 'request', None) is not None, _get_request_error
AssertionError: Request global variable is not set.

It seems like something isnt going right when loading up a new instance. So that when a handler gets loaded and try to use

user = self.auth.get_user_by_session()

webapp2 isnt loaded properly, because if i refresh and hit the same instance the error goes away. Has anyone seen this error, any help or direction would be greatly apreciated.

EDIT:

A little more info. Im using

libraries:
- name: webapp2
  version: latest

and python 2.7 . my BaseHandler looks like this

class BaseHandler(webapp2.RequestHandler):
"""
    BaseHandler for all requests

    Holds the auth and session properties so they are reachable for all requests
"""
def dispatch(self):
    # Get a session store for this request.
    self.session_store = sessions.get_store(request=self.request)
    try:
        # Dispatch the request.
        webapp2.RequestHandler.dispatch(self)
    finally:
        # Save all sessions.
        self.session_store.save_sessions(self.response)

@webapp2.cached_property
def auth(self):
    return auth.get_auth()

@webapp2.cached_property
def session(self):
    # Returns a session using the default cookie key.
    return self.session_store.get_session()

@webapp2.cached_property
def session_store(self):
    return sessions.get_store(request=self.request)

@webapp2.cached_property
def messages(self):
    return self.session.get_flashes(key='_messages')

def add_message(self, message, level=None):
    self.session.add_flash(message, level, key='_messages')

@webapp2.cached_property
def user(self):
    return self.auth.get_user_by_session()

app = ndb.toplevel(webapp2.WSGIApplication(routes.URLS, debug=config.DEBUG, config=config.CONFIG))

Something is wrong with webapp2 ?

  • 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-10T23:07:18+00:00Added an answer on June 10, 2026 at 11:07 pm

    This seems to be a Bug in the Webapp2 library as discussed here: https://groups.google.com/forum/?fromgroups=#!topic/webapp2/sHb2RYxGDLc

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

Sidebar

Related Questions

getting really close to running my first stored procedure. This one compiles but when
Okay...I'm really getting a bit frustrated with this. I know that this post will
This is really getting me frustrated. I'm trying to build a custom JavaScript app
I am getting really confused with this concept: If I want to implement a
This is really getting to me now.I have a form that loads when the
I'm getting a really strange NPE exception. This is the offending code: private static
I'm getting a really strange error when making a method call: /* input.cpp */
I'm not really getting how this code does what it does: char shellcode[] =
Sorry if this is a really basic question but it's been really getting to
Arghhh! I'm getting so frustrated trying to get my head around this WCF service.

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.