title: Django/App Engine/Python 2.5: default __new__ takes no parameters
body: <p>New to app engine and django.  I think this is an issue with my django install, which is 1.1.1, but I've also read that I can just use the django packaged with the app engine SDK.</p>
  
  <p>Any help on why I'm getting this error when I test locally would be greatly appreciated.</p>
  
  <p><strong>The callback:</strong></p>
  
  <pre><code>Variable Value
  callback 
  &lt;class 'ourlat.main.views.SettingsPage'&gt;
  callback_args 
  ()
  callback_kwargs 
  {}
  e 
  TypeError('default __new__ takes no parameters',)
  exc_info 
  (&lt;type 'exceptions.TypeError'&gt;, TypeError('default __new__ takes no parameters',), &lt;traceback object at 0x02201B48&gt;)
  exceptions 
  &lt;module 'django.core.exceptions' from 'C:\Documents and Settings\Jeremy Gordon\eclipse-workspace\ourlat\django\core\exceptions.pyc'&gt;
  middleware_method 
  &lt;bound method CommonMiddleware.process_request of &lt;django.middleware.common.CommonMiddleware object at 0x021F5170&gt;&gt;
  receivers 
  [(&lt;function _rollback_on_exception at 0x02063730&gt;, None)]
  request 
  &lt;WSGIRequest GET:&lt;QueryDict: {}&gt;, POST:&lt;QueryDict: {}&gt;, COOKIES:{}, META:{'APPLICATION_ID': 'ourlat', 'AUTH_DOMAIN': 'gmail.com', 'CONTENT_LENGTH': '', 'CONTENT_TYPE': 'application/x-www-form-urlencoded', 'CURRENT_VERSION_ID': '1.1', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_ACCEPT': 'application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5', 'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.3', 'HTTP_ACCEPT_LANGUAGE': 'en-US,en;q=0.8', 'HTTP_CACHE_CONTROL': 'max-age=0', 'HTTP_CONNECTION': 'keep-alive', 'HTTP_HOST': 'localhost:8080', 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/533.1 (KHTML, like Gecko) Chrome/5.0.335.1 Safari/533.1', 'PATH_INFO': u'/', 'PATH_TRANSLATED': 'C:\\Documents and Settings\\Jeremy Gordon\\eclipse-workspace\\ourlat\\main.py', 'QUERY_STRING': '', 'REMOTE_ADDR': '127.0.0.1', 'REQUEST_METHOD': 'GET', 'SCRIPT_NAME': u'', 'SERVER_NAME': 'localhost', 'SERVER_PORT': '8080', 'SERVER_PROTOCOL': 'HTTP/1.0', 'SERVER_SOFTWARE': 'Development/1.0', 'TZ': 'UTC', 'USER_EMAIL': '', 'USER_ID': '', 'USER_ORGANIZATION': '', 'wsgi.errors': &lt;open file '&lt;stderr&gt;', mode 'w' at 0x00B1F0B0&gt;, 'wsgi.input': &lt;cStringIO.StringI object at 0x022A0260&gt;, 'wsgi.multiprocess': False, 'wsgi.multithread': False, 'wsgi.run_once': True, 'wsgi.url_scheme': 'http', 'wsgi.version': (1, 0)}&gt;
  resolver 
  &lt;RegexURLResolver urls (None:None) ^/&gt;
  response 
  None
  self 
  &lt;django.core.handlers.wsgi.WSGIHandler object at 0x021F5790&gt;
  settings 
  &lt;django.conf.LazySettings object at 0x01E997B0&gt;
  urlconf 
  'urls'
  urlresolvers 
  &lt;module 'django.core.urlresolvers' from 'C:\Documents and Settings\Jeremy Gordon\eclipse-workspace\ourlat\django\core\urlresolvers.pyc'&gt;
  </code></pre>
  
  <p><strong>The error:</strong></p>
  
  <pre><code>TypeError at /
  default __new__ takes no parameters
  Request Method: GET
  Request URL: http://localhost:8080/
  Exception Type: TypeError
  Exception Value: 
  default __new__ takes no parameters
  Exception Location: C:\Documents and Settings\Jeremy Gordon\eclipse-workspace\ourlat\django\core\handlers\base.py in get_response, line 92
  Python Executable: C:\Python25\python.exe
  Python Version: 2.5.0
  Python Path: ['C:\\Documents and Settings\\Jeremy Gordon\\eclipse-workspace\\ourlat', 'C:\\Program Files\\Google\\google_appengine', 'C:\\Program Files\\Google\\google_appengine\\lib\\antlr3', 'C:\\Program Files\\Google\\google_appengine\\lib\\django', 'C:\\Program Files\\Google\\google_appengine\\lib\\ipaddr', 'C:\\Program Files\\Google\\google_appengine\\lib\\webob', 'C:\\Program Files\\Google\\google_appengine\\lib\\yaml\\lib', 'C:\\Program Files\\Google\\google_appengine', 'C:\\Python25\\lib\\site-packages\\beautifulsoup-3.1.0.1-py2.5.egg', 'C:\\Python25\\lib\\site-packages\\django-1.1.1-py2.5.egg', 'C:\\Documents and Settings\\Jeremy Gordon\\eclipse-workspace\\ourlat\\ourlat', 'C:\\Program Files\\Google\\google_appengine', 'C:\\Program Files\\Google\\google_appengine\\lib\\webob', 'C:\\Program Files\\Google\\google_appengine\\lib\\yaml', 'C:\\Program Files\\Google\\google_appengine\\lib', 'C:\\Program Files\\Google\\google_appengine\\lib\\simplejson-2.0.9', 'C:\\Program Files\\Google\\google_appengine\\lib\\geopy', 'C:\\Program Files\\Google\\google_appengine\\lib\\BeautifulSoup-3.0.8', 'C:\\Documents and Settings\\Jeremy Gordon\\eclipse-workspace\\ourlat\\django', 'C:\\Python25', 'C:\\Python25\\DLLs', 'C:\\Python25\\lib', 'C:\\Python25\\lib\\lib-tk', 'C:\\Python25\\lib\\plat-win', 'C:\\Python25\\lib\\site-packages', 'C:\\Python25\\lib\\site-packages\\setuptools-0.6c7-py2.5.egg', 'C:\\Python25\\lib\\site-packages\\simplejson-2.0.9-py2.5.egg', 'C:\\Python25\\Lib\\site-packages\\geopy-0.93dev_r0-py2.5.egg', 'C:\\WINDOWS\\system32\\python25.zip']
  Server time: Sat, 6 Mar 2010 01:18:27 +0000
  </code></pre>
  
  <p><strong>SettingsPage source</strong></p>
  
  <pre><code>class SettingsPage(webapp.RequestHandler):
      def get(self):
          if users.get_current_user():
              url = users.create_logout_url(self.request.uri)
              url_linktext = 'Logout'
              account_query = OLAccount.all().filter('owner =',users.get_current_user())
              if account_query.count() &lt; 1:
                  thisuser = OLAccount(owner = users.get_current_user())
                  thisuser.put()
              else:
                  thisuser = account_query.fetch(1)[0]
  
              tracks = [db.get(key) for key in thisuser.track_keys] 
              template_values = {
                  'url': url,
                  'url_linktext': url_linktext,
                  'thisuser': thisuser,
                  'tracks': tracks
                  }
  
              path = os.path.join(os.path.dirname(__file__), 'html/settings.html')
              self.response.out.write(template.render(path, template_values))
          else:
              self.redirect(users.create_login_url(self.request.uri))
  </code></pre>