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

  • Home
  • SEARCH
  • 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 6758051
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T13:43:43+00:00 2026-05-26T13:43:43+00:00

I have had many problems in Django (not all of them solved), but this

  • 0

I have had many problems in Django (not all of them solved), but this is by far the weirdest and most incomprehensible one. It happens when I load a page:

>python manage.py runserver

Validating models...

0 errors found
Django version 1.3.1, using settings 'ponysite.settings'
Development server is running at http://127.0.0.1:8000/
Quit the server with CTRL-BREAK.
[01/Nov/2011 01:21:49] "GET / HTTP/1.0" 500 102747

Traceback (most recent call last):
  File "C:\Python27\lib\site-packages\django\core\servers\basehttp.py", line 284, in run
    self.finish_response()
  File "C:\Python27\lib\site-packages\django\core\servers\basehttp.py", line 324, in finish_response
    self.write(data)
  File "C:\Python27\lib\site-packages\django\core\servers\basehttp.py", line 420, in write
    self._write(data)
  File "C:\Python27\lib\socket.py", line 324, in write
    self.flush()
  File "C:\Python27\lib\socket.py", line 303, in flush
    self._sock.sendall(view[write_offset:write_offset+buffer_size])
error: [Errno 10054] An existing connection was forcibly closed by the remote host
----------------------------------------
Exception happened during processing of request from ('127.0.0.1', 63095)
Traceback (most recent call last):
  File "C:\Python27\lib\SocketServer.py", line 284, in _handle_request_noblock
    self.process_request(request, client_address)
  File "C:\Python27\lib\SocketServer.py", line 310, in process_request
    self.finish_request(request, client_address)
  File "C:\Python27\lib\SocketServer.py", line 323, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "C:\Python27\lib\site-packages\django\core\servers\basehttp.py", line 570, in __init__
    BaseHTTPRequestHandler.__init__(self, *args, **kwargs)
  File "C:\Python27\lib\SocketServer.py", line 641, in __init__
    self.finish()
  File "C:\Python27\lib\SocketServer.py", line 694, in finish
    self.wfile.flush()
  File "C:\Python27\lib\socket.py", line 303, in flush
    self._sock.sendall(view[write_offset:write_offset+buffer_size])
error: [Errno 10054] An existing connection was forcibly closed by the remote host
----------------------------------------
Traceback (most recent call last):
  File "C:\Python27\lib\site-packages\django\core\servers\basehttp.py", line 284, in run
    self.finish_response()
  File "C:\Python27\lib\site-packages\django\core\servers\basehttp.py", line 324, in finish_response
    self.write(data)
  File "C:\Python27\lib\site-packages\django\core\servers\basehttp.py", line 420, in write
    self._write(data)
  File "C:\Python27\lib\socket.py", line 324, in write
    self.flush()
  File "C:\Python27\lib\socket.py", line 303, in flush
    self._sock.sendall(view[write_offset:write_offset+buffer_size])
error: [Errno 10054] An existing connection was forcibly closed by the remote host
----------------------------------------
Exception happened during processing of request from ('127.0.0.1', 63099)
Traceback (most recent call last):
  File "C:\Python27\lib\SocketServer.py", line 284, in _handle_request_noblock
    self.process_request(request, client_address)
  File "C:\Python27\lib\SocketServer.py", line 310, in process_request
    self.finish_request(request, client_address)
  File "C:\Python27\lib\SocketServer.py", line 323, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "C:\Python27\lib\site-packages\django\core\servers\basehttp.py", line 570, in __init__
    BaseHTTPRequestHandler.__init__(self, *args, **kwargs)
  File "C:\Python27\lib\SocketServer.py", line 641, in __init__
    self.finish()
  File "C:\Python27\lib\SocketServer.py", line 694, in finish
    self.wfile.flush()
  File "C:\Python27\lib\socket.py", line 303, in flush
    self._sock.sendall(view[write_offset:write_offset+buffer_size])
error: [Errno 10054] An existing connection was forcibly closed by the remote host
----------------------------------------

[01/Nov/2011 01:21:53] "GET / HTTP/1.0" 500 102391

I have tried wiping and recreating the database, stripping down views.py and models.py to the bare minimum to no avail. I have also tried running the same project on another computer with the same result. Both are running Windows x64. Actually, I think the one computer is running Django 1.3.x and the ther 1.2.x, but the error looks the same regardless.

Here is the full traceback:

Environment:

Request Method: GET
Request URL: http://127.0.0.1:8000/

Django Version: 1.3.1
Python Version: 2.7.2

Installed Applications:
['django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.sites',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'django.contrib.admin',
 'django.contrib.admindocs',
 'forum',
 'django.contrib.markup']

Installed Middleware:
('django.middleware.common.CommonMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware')

Traceback:
File "C:\Python27\lib\site-packages\django\core\handlers\base.py" in get_response
  101.                             request.path_info)
File "C:\Python27\lib\site-packages\django\core\urlresolvers.py" in resolve
  250.             for pattern in self.url_patterns:
File "C:\Python27\lib\site-packages\django\core\urlresolvers.py" in _get_url_patterns
  279.         patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
File "C:\Python27\lib\site-packages\django\core\urlresolvers.py" in _get_urlconf_module
  274.             self._urlconf_module = import_module(self.urlconf_name)
File "C:\Python27\lib\site-packages\django\utils\importlib.py" in import_module
  35.     __import__(name)
File "C:\Users\kiwi\Dropbox\Programming Projects\Django Projects\ponysite\..\ponysite\urls.py" in 
  3. admin.autodiscover()
File "C:\Python27\lib\site-packages\django\contrib\admin\__init__.py" in autodiscover
  26.             import_module('%s.admin' % app)
File "C:\Python27\lib\site-packages\django\utils\importlib.py" in import_module
  35.     __import__(name)
File "C:\Users\kiwi\Dropbox\Programming Projects\Django Projects\ponysite\forum\admin.py" in 
  1. from forum.models  import Category, Thread, Post, Report, Subscription, Ban

Exception Type: ImportError at /
Exception Value: cannot import name Ban

Ban was a model in models.py (imported in views.py) I played around with for a while, but it is currently commented out everywhere in my model, view, and controller. I don’t know if it has anything at all to do with the problem.

Thanks in advance, guys.

  • 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-26T13:43:44+00:00Added an answer on May 26, 2026 at 1:43 pm

    Based on this line:

    File "C:\Users\kiwi\Dropbox\Programming Projects\Django Projects\ponysite\forum\admin.py" in
    1. from forum.models  import Category, Thread, Post, Report, Subscription, Ban
    

    Django is finding in forum/admin.py

    from forum.models  import Category, Thread, Post, Report, Subscription, Ban
    

    Note the Ban at the end that is not defined in models. Remove it and the error should be gone.

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

Sidebar

Related Questions

I have had a look all over, but it doesn't seem as though my
I have had a few problems getting this right, so I wanted to ask
Uhm, so I had problems with the title, but this was my best shot!
I know there are many problems like this, but I've followed a bunch of
I have had this problem crop up a few times and I can't figure
I have had several situations when i would like to do that. This could
Lets say I have three django model classes - lets call them A, B
I had some problems with Terminal.app in OSX when my backspace key didn't have
I really like Play and it adresses all the problems I had when develpoing
I encounter this problem : I have a django (python) server that serve XML

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.