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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T00:49:31+00:00 2026-05-18T00:49:31+00:00

Whenever i click on the link created by users.create_login_url() , i get an error

  • 0

Whenever i click on the link created by users.create_login_url(), i get an error (shown below). When deployed, the thing works, but doesn’t work locally.
What is wrong?

Here’s the code:

import random
import os

from google.appengine.api import users
from google.appengine.ext import webapp, db
from google.appengine.ext.webapp import util, template
from google.appengine.ext.webapp.util import run_wsgi_app


class MainHandler(webapp.RequestHandler):
    def get(self):
        url = users.create_login_url('/quote')
        link = '<a href="%s">Login</a>' % url
        self.response.out.write(link)

class QuoteHandler(webapp.RequestHandler):
    def get(self):
        self.response.out.write("Quote Handler!")

    def new(self):
        self.response.out.write("New quote")


def main():
    application = webapp.WSGIApplication([(r'/quote/(.*)',QuoteHandler),('/', MainHandler)],
                                         debug=True)
    util.run_wsgi_app(application)


if __name__ == '__main__':
    main()

And here’s the error it gives me:

Traceback (most recent call last):
  File "C:\Program Files\Google\google_appengine\google\appengine\tools\dev_appserver.py", line 3211, in _HandleRequest
    self._Dispatch(dispatcher, self.rfile, outfile, env_dict)
  File "C:\Program Files\Google\google_appengine\google\appengine\tools\dev_appserver.py", line 3154, in _Dispatch
    base_env_dict=env_dict)
  File "C:\Program Files\Google\google_appengine\google\appengine\tools\dev_appserver.py", line 527, in Dispatch
    base_env_dict=base_env_dict)
  File "C:\Program Files\Google\google_appengine\google\appengine\tools\dev_appserver.py", line 2452, in Dispatch
    CGIDispatcher.Dispatch(self, *args, **kwargs)
  File "C:\Program Files\Google\google_appengine\google\appengine\tools\dev_appserver.py", line 2404, in Dispatch
    self._module_dict)
  File "C:\Program Files\Google\google_appengine\google\appengine\tools\dev_appserver.py", line 2441, in curried_exec_cgi
    return ExecuteCGI(*args, **kwargs)
  File "C:\Program Files\Google\google_appengine\google\appengine\tools\dev_appserver.py", line 2312, in ExecuteCGI
    logging.debug('Executing CGI with env:\n%s', pprint.pformat(env))
  File "C:\Python27\lib\pprint.py", line 60, in pformat
    return PrettyPrinter(indent=indent, width=width, depth=depth).pformat(object)
  File "C:\Python27\lib\pprint.py", line 119, in pformat
    self._format(object, sio, 0, 0, {}, 0)
  File "C:\Python27\lib\pprint.py", line 137, in _format
    rep = self._repr(object, context, level - 1)
  File "C:\Python27\lib\pprint.py", line 230, in _repr
    self._depth, level)
  File "C:\Python27\lib\pprint.py", line 242, in format
    return _safe_repr(object, context, maxlevels, level)
  File "C:\Python27\lib\pprint.py", line 284, in _safe_repr
    for k, v in _sorted(object.items()):
  File "C:\Python27\lib\pprint.py", line 75, in _sorted
    with warnings.catch_warnings():
  File "C:\Python27\lib\warnings.py", line 327, in __init__
    self._module = sys.modules['warnings'] if module is None else module
KeyError: 'warnings'

EDIT
SDK Version: 1.3.8
Python: 2.7

  • 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-18T00:49:32+00:00Added an answer on May 18, 2026 at 12:49 am

    I’ve seen this problem — you’re running the wrong version of Python locally.

    Install Python 2.5 and ths problem should go away — it did for me.

    http://www.python.org/download/releases/2.5.5/

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

Sidebar

Related Questions

Hey guys, I'm trying to get Shadowbox to work. Whenever I click the link,
I am getting the following error whenever I click on a postbacking control HttpException
Whenever I try to install a Click Once application, I always get a 404
Whenever I show a ModalPopupExtender on my Sharepoint site, the popup shown creates both
I have a document library with a PDF file. Whenever I click on the
Whenever I design a database, I always wonder if there is a best way
Whenever I try to add a new project to my SourceSafe repository it creates
Whenever I indent HTML in PHP mode, emacs (22.1.1, basic install on Redaht Linux
Whenever I type a (, [, or {, Notepad++ completes it with the corresponding
Whenever I'm at a break point in a certain C#.NET application in Visual Studio

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.