[wingide-users] django project beta5

John Fabiani johnf at jfcomputer.com
Sun Jan 2 11:08:50 MST 2011


Hi,
I am getting a 500 from one of my python routines which would mean I have a 
bug.  However, this very strange because the issue is related to datetime.  If 
I run the code using the runserver outside of wing everything just works. I'm 
not renaming the datetime nor do I have any var named datetime.  And to my 
knowledge this only started with b5.  


The only error I see is below:
this is in messages:
General: Failed to restore visual state for Bookmarks
  Bookmark manager state

this is from the debug I/O	
[02/Jan/2011 09:52:45] "POST /register/registeruser/ HTTP/1.1" 500 83240

Like I said this is very strange because not using Wing I don't don't see 
anything going wrong.

The actual traceback is assoicated with the following statement:

now = datetime.datetime.now()

AttributeError: 'NoneType' object has no attribute 'datetime'
File "/home/johnf/pesweb/manage.py", line 11, in <module>
  execute_manager(settings)
File "/usr/lib/python2.6/site-packages/django/core/management/__init__.py", 
line 438, in execute_manager
  utility.execute()
File "/usr/lib/python2.6/site-packages/django/core/management/__init__.py", 
line 379, in execute
  self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/lib/python2.6/site-packages/django/core/management/base.py", line 
191, in run_from_argv
  self.execute(*args, **options.__dict__)
File "/usr/lib/python2.6/site-packages/django/core/management/base.py", line 
220, in execute
  output = self.handle(*args, **options)
File "/usr/lib/python2.6/site-
packages/django/core/management/commands/runserver.py", line 84, in handle
  inner_run()
File "/usr/lib/python2.6/site-
packages/django/core/management/commands/runserver.py", line 60, in inner_run
  run(addr, int(port), handler)
File "/usr/lib/python2.6/site-packages/django/core/servers/basehttp.py", line 
721, in run
  httpd.serve_forever()
File "/usr/lib/python2.6/SocketServer.py", line 226, in serve_forever
  self._handle_request_noblock()
File "/usr/lib/python2.6/SocketServer.py", line 281, in 
_handle_request_noblock
  self.process_request(request, client_address)
File "/usr/lib/python2.6/SocketServer.py", line 307, in process_request
  self.finish_request(request, client_address)
File "/usr/lib/python2.6/SocketServer.py", line 320, in finish_request
  self.RequestHandlerClass(request, client_address, self)
File "/usr/lib/python2.6/site-packages/django/core/servers/basehttp.py", line 
562, in __init__
  BaseHTTPRequestHandler.__init__(self, *args, **kwargs)
File "/usr/lib/python2.6/SocketServer.py", line 615, in __init__
  self.handle()
File "/usr/lib/python2.6/site-packages/django/core/servers/basehttp.py", line 
607, in handle
  handler.run(self.server.get_app())
File "/usr/lib/python2.6/site-packages/django/core/servers/basehttp.py", line 
280, in run
  self.result = application(self.environ, self.start_response)
File "/usr/lib/python2.6/site-packages/django/core/servers/basehttp.py", line 
674, in __call__
  return self.application(environ, start_response)
File "/usr/lib/python2.6/site-packages/django/core/handlers/wsgi.py", line 
241, in __call__
  response = self.get_response(request)
File "/usr/lib/python2.6/site-packages/django/core/handlers/base.py", line 
100, in get_response
  response = callback(request, *callback_args, **callback_kwargs)
File "/home/johnf/pesweb/register/views.py", line 378, in registeruser
  user = User.objects.create_user(c.registration_id, c.email, 
request.POST['txtPassword'])
File "/usr/lib/python2.6/site-packages/django/contrib/auth/models.py", line 
110, in create_user
  now = datetime.datetime.now()


Johnf



More information about the wingide-users mailing list