"connection already closed" when adding a comment

Issue #180 resolved
Former user created an issue

I'm not sure that this is related to satchmo, but still :

{{{
MOD_PYTHON ERROR

ProcessId: 3768
Interpreter: 'satchmo.chakujiu'

ServerName: 'satchmo.chakujiu'
DocumentRoot: '/home/httpd/satchmo'

URI: '/comments/post/'
Location: '/'
Directory: None
Filename: '/home/httpd/satchmo/comments'
PathInfo: '/post/'

Phase: 'PythonHandler'
Handler: 'django.core.handlers.modpython'

Traceback (most recent call last):

File "/usr/lib/python2.4/site-packages/mod_python/importer.py", line 1537, in HandlerDispatch
default=default_handler, arg=req, silent=hlist.silent)

File "/usr/lib/python2.4/site-packages/mod_python/importer.py", line 1229, in _process_target
result = _execute_target(config, req, object, arg)

File "/usr/lib/python2.4/site-packages/mod_python/importer.py", line 1128, in _execute_target
result = object(arg)

File "/usr/lib/python2.4/site-packages/django/core/handlers/modpython.py", line 181, in handler
return ModPythonHandler()(req)

File "/usr/lib/python2.4/site-packages/django/core/handlers/modpython.py", line 161, in call
dispatcher.send(signal=signals.request_finished)

File "/usr/lib/python2.4/site-packages/django/dispatch/dispatcher.py", line 358, in send
sender=sender,

File "/usr/lib/python2.4/site-packages/django/dispatch/robustapply.py", line 47, in robustApply
return receiver(arguments, *named)

File "/usr/lib/python2.4/site-packages/django/db/backends/init.py", line 28, in close
self.connection.close()

InterfaceError: connection already closed
}}}

That happened when I was trying to add comment.

I have libapache2-mod-python 3.3.1-2, apache2-mpm-prefork 2.2.6-1
django revision 6439, django-comment-utils revision 78, satchmo revision 787
and following :

INSTALLED_APPS = (
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.comments',
'comment_utils',
'django.contrib.sitemaps',
'satchmo.caching',
'satchmo.configuration',
'satchmo.shop',
'satchmo.contact',
'satchmo.product',
'satchmo.shipping',
'payment',
'satchmo.discount',
'satchmo.supplier',
'satchmo.thumbnail',
'satchmo.l10n',
'satchmo.tax',
'registration',
'i18n',
)

Reported by imgrey

Comments (5)

  1. Anonymous

    This is a configuration error. settings.SITE_ID must correspond to a Site that exists in the database. Add one and change settings.SITE_ID to the Site's id, which will be the number in its URL.

    You don't want to leave the isolation level on autocommit. It causes problems with fixtures. The change is only useful as a temporary workaround to get a useful traceback.

  2. Anonymous

    Replying to [comment:3 jshaffer]:

    The "connection already closed" error is common when there are programming errors with PostgreSQL. See [http://code.djangoproject.com/ticket/3460 Django ticket 3460].

    There's likely an error earlier in Satchmo's code. comment_utils is a possibility as well.

    I've changed self.connection.set_isolation_level(1) # make transactions transparent to all cursors to self.connection.set_isolation_level(0) # autocommit

    according to recomendations. And got this :

    IntegrityError at /comments/post/
    insert or update on table "comments_comment" violates foreign key constraint "comments_comment_site_id_fkey" DETAIL: Ключ (site_id)=(1) отсутствует в таблице "django_site". 
    
        * /usr/lib/python2.4/site-packages/django/core/handlers/base.py in _real_get_response
            74. # Apply view middleware
            75. for middleware_method in self._view_middleware:
            76. response = middleware_method(request, callback, callback_args, callback_kwargs)
            77. if response:
            78. return response
            79.
            80. try:
            81. response = callback(request, *callback_args, **callback_kwargs) ...
            82. except Exception, e:
            83. # If the view raised an exception, run it through exception
            84. # middleware, and if the exception middleware returns a
            85. # response, use that. Otherwise, reraise the exception.
            86. for middleware_method in self._exception_middleware:
            87. response = middleware_method(request, e)
          ▶ Local vars
          Variable 	Value
          callback 	
          <function post_rating at 0x8cf31ec>
          callback_args 	
          ()
          callback_kwargs 	
          {'maxcomments': 1}
          debug 	
          <module 'django.views.debug' from '/usr/lib/python2.4/site-packages/django/views/debug.pyc'>
          e 	
          <psycopg2.IntegrityError instance at 0x8d50e6c>
          exceptions 	
          <module 'django.core.exceptions' from '/usr/lib/python2.4/site-packages/django/core/exceptions.pyc'>
          mail_admins 	
          <function mail_admins at 0xb732348c>
          middleware_method 	
          <bound method SSLRedirect.process_view of <satchmo.shop.SSLMiddleware.SSLRedirect instance at 0xb732da0c>>
          request 	
          <ModPythonRequest\npath:/comments/post/,\nGET:<QueryDict: {}>,\nPOST:<QueryDict: {u'comment': [u'+1\r\n'], u'gonzo': [u'892997a779cfa4e2a88ab8e5a06e3a1f'], u'target': [u'29:2'], u'url': [u'/product/ST3500601XS-RK/'], u'rating_options': [u'c2NhbGU6MS01fFJhdGluZw=='], u'post': [u'Send review'], u'options': [u'ra,ip']}>,\nCOOKIES:{'__utma': '31447357.75162487.1190814788.1191270710.1191342621.14',\n '__utmb': '31447357',\n '__utmc': '31447357',\n '__utmz': '31447357.1190814788.1.1.utmccn=(direct)|utmcsr=(direct)|utmcmd=(none)',\n 'sessionid': 'a902ef4876d82a08a6979ca0f9d65957'},\nMETA:{'AUTH_TYPE': None,\n 'CONTENT_LENGTH': 0L,\n 'CONTENT_TYPE': None,\n 'GATEWAY_INTERFACE': 'CGI/1.1',\n 'HTTP_ACCEPT': 'text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5',\n 'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7',\n 'HTTP_ACCEPT_ENCODING': 'gzip,deflate',\n 'HTTP_ACCEPT_LANGUAGE': 'en-us,en;q=0.5',\n 'HTTP_CONNECTION': 'keep-alive',\n 'HTTP_CONTENT_LENGTH': '183',\n 'HTTP_CONTENT_TYPE': 'application/x-www-form-urlencoded',\n 'HTTP_COOKIE': '__utma=31447357.75162487.1190814788.1191270710.1191342621.14; sessionid=a902ef4876d82a08a6979ca0f9d65957; __utmz=31447357.1190814788.1.1.utmccn=(direct)|utmcsr=(direct)|utmcmd=(none); __utmb=31447357; __utmc=31447357',\n 'HTTP_HOST': 'satchmo.chakujiu',\n 'HTTP_KEEP_ALIVE': '300',\n 'HTTP_REFERER': 'http://satchmo.chakujiu/product/ST3500601XS-RK/',\n 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.6) Gecko/20070723 Iceweasel/2.0.0.6 (Debian-2.0.0.6-1)',\n 'PATH_INFO': '/post/',\n 'PATH_TRANSLATED': None,\n 'QUERY_STRING': None,\n 'REMOTE_ADDR': '192.168.0.104',\n 'REMOTE_HOST': None,\n 'REMOTE_IDENT': None,\n 'REMOTE_USER': None,\n 'REQUEST_METHOD': 'POST',\n 'SCRIPT_NAME': None,\n 'SERVER_NAME': 'satchmo.chakujiu',\n 'SERVER_PORT': 0,\n 'SERVER_PROTOCOL': 'HTTP/1.1',\n 'SERVER_SOFTWARE': 'mod_python'}>
          resolver 	
          <RegexURLResolver satchmo.urls ^/>
          response 	
          None
          self 	
          <django.core.handlers.modpython.ModPythonHandler object at 0xb73ebd6c>
          settings 	
          <django.conf.LazySettings object at 0xb7380aac>
          urlconf 	
          u'satchmo.urls'
          urlresolvers 	
          <module 'django.core.urlresolvers' from '/usr/lib/python2.4/site-packages/django/core/urlresolvers.pyc'>
        * /home/grey/src/testbox/satchmo/shop/views/comments.py in post_rating
            13. """Wrap django.contrib.comments.views.comments.post_comment, so that we can control where the user
            14. is returned after submit, also add the ability to control the maximum number of ratings per user
            15. per product.
            16. """
            17. if request.POST.has_key('url'):
            18. url = request.POST['url']
      19.
            20. response = post_comment(request) ...
            21.
            22. if maxcomments > 0 and not request.user.is_anonymous():
            23. try:
            24. target = request.POST['target']
            25. except KeyError:
            26. raise Http404, _("One or more of the required fields wasn't submitted")
          ▶ Local vars
          Variable 	Value
          maxcomments 	
          1
          request 	
          <ModPythonRequest\npath:/comments/post/,\nGET:<QueryDict: {}>,\nPOST:<QueryDict: {u'comment': [u'+1\r\n'], u'gonzo': [u'892997a779cfa4e2a88ab8e5a06e3a1f'], u'target': [u'29:2'], u'url': [u'/product/ST3500601XS-RK/'], u'rating_options': [u'c2NhbGU6MS01fFJhdGluZw=='], u'post': [u'Send review'], u'options': [u'ra,ip']}>,\nCOOKIES:{'__utma': '31447357.75162487.1190814788.1191270710.1191342621.14',\n '__utmb': '31447357',\n '__utmc': '31447357',\n '__utmz': '31447357.1190814788.1.1.utmccn=(direct)|utmcsr=(direct)|utmcmd=(none)',\n 'sessionid': 'a902ef4876d82a08a6979ca0f9d65957'},\nMETA:{'AUTH_TYPE': None,\n 'CONTENT_LENGTH': 0L,\n 'CONTENT_TYPE': None,\n 'GATEWAY_INTERFACE': 'CGI/1.1',\n 'HTTP_ACCEPT': 'text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5',\n 'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7',\n 'HTTP_ACCEPT_ENCODING': 'gzip,deflate',\n 'HTTP_ACCEPT_LANGUAGE': 'en-us,en;q=0.5',\n 'HTTP_CONNECTION': 'keep-alive',\n 'HTTP_CONTENT_LENGTH': '183',\n 'HTTP_CONTENT_TYPE': 'application/x-www-form-urlencoded',\n 'HTTP_COOKIE': '__utma=31447357.75162487.1190814788.1191270710.1191342621.14; sessionid=a902ef4876d82a08a6979ca0f9d65957; __utmz=31447357.1190814788.1.1.utmccn=(direct)|utmcsr=(direct)|utmcmd=(none); __utmb=31447357; __utmc=31447357',\n 'HTTP_HOST': 'satchmo.chakujiu',\n 'HTTP_KEEP_ALIVE': '300',\n 'HTTP_REFERER': 'http://satchmo.chakujiu/product/ST3500601XS-RK/',\n 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.6) Gecko/20070723 Iceweasel/2.0.0.6 (Debian-2.0.0.6-1)',\n 'PATH_INFO': '/post/',\n 'PATH_TRANSLATED': None,\n 'QUERY_STRING': None,\n 'REMOTE_ADDR': '192.168.0.104',\n 'REMOTE_HOST': None,\n 'REMOTE_IDENT': None,\n 'REMOTE_USER': None,\n 'REQUEST_METHOD': 'POST',\n 'SCRIPT_NAME': None,\n 'SERVER_NAME': 'satchmo.chakujiu',\n 'SERVER_PORT': 0,\n 'SERVER_PROTOCOL': 'HTTP/1.1',\n 'SERVER_SOFTWARE': 'mod_python'}>
          url 	
          u'/product/ST3500601XS-RK/'
        * /usr/lib/python2.4/site-packages/django/contrib/comments/views/comments.py in post_comment
           249. elif 'post' in request.POST:
           250. # If the IP is banned, mail the admins, do NOT save the comment, and
           251. # serve up the "Thanks for posting" page as if the comment WAS posted.
           252. if request.META['REMOTE_ADDR'] in settings.BANNED_IPS:
           253. mail_admins("Banned IP attempted to post comment", smart_unicode(request.POST) + "\n\n" + str(request.META))
           254. else:
           255. manipulator.do_html2python(new_data)
           256. comment = manipulator.save(new_data) ...
           257. return HttpResponseRedirect("../posted/?c=%s:%s" % (content_type_id, object_id))
           258. else:
           259. raise Http404, _("The comment form didn't provide either 'preview' or 'post'")
           260.
           261. def post_free_comment(request, extra_context=None, context_processors=None):
           262. """
          ▶ Local vars
          Variable 	Value
          content_type_id 	
          u'29'
          context_processors 	
          None
          errors 	
          {}
          extra_context 	
          {}
          manipulator 	
          <django.contrib.comments.views.comments.PublicCommentManipulator object at 0x8d40c8c>
          new_data 	
          <QueryDict: {u'comment': [u'+1\r\n'], u'username': [None], u'rating1': [None], u'gonzo': [u'892997a779cfa4e2a88ab8e5a06e3a1f'], u'target': [u'29:2'], u'rating2': [None], u'rating3': [None], u'url': [u'/product/ST3500601XS-RK/'], u'rating4': [None], u'rating5': [None], u'rating_options': [u'c2NhbGU6MS01fFJhdGluZw=='], u'rating8': [None], u'rating7': [None], u'object_id': [u'2'], u'is_public': [True], u'post': [u'Send review'], u'password': [None], u'ip_address': [u'192.168.0.104'], u'options': [u'ra,ip'], u'rating6': [None], u'content_type_id': [u'29']}>
          obj 	
          <Product: Seagate eSATA 500-GB External Hard Drive (ST3500601XS-RK)>
          object_id 	
          u'2'
          option_list 	
          [u'ra', u'ip']
          options 	
          u'ra,ip'
          photo_options 	
          u''
          rating_choices 	
          ['Rating']
          rating_options 	
          u'c2NhbGU6MS01fFJhdGluZw=='
          rating_range 	
          [1, 2, 3, 4, 5]
          request 	
          <ModPythonRequest\npath:/comments/post/,\nGET:<QueryDict: {}>,\nPOST:<QueryDict: {u'comment': [u'+1\r\n'], u'gonzo': [u'892997a779cfa4e2a88ab8e5a06e3a1f'], u'target': [u'29:2'], u'url': [u'/product/ST3500601XS-RK/'], u'rating_options': [u'c2NhbGU6MS01fFJhdGluZw=='], u'post': [u'Send review'], u'options': [u'ra,ip']}>,\nCOOKIES:{'__utma': '31447357.75162487.1190814788.1191270710.1191342621.14',\n '__utmb': '31447357',\n '__utmc': '31447357',\n '__utmz': '31447357.1190814788.1.1.utmccn=(direct)|utmcsr=(direct)|utmcmd=(none)',\n 'sessionid': 'a902ef4876d82a08a6979ca0f9d65957'},\nMETA:{'AUTH_TYPE': None,\n 'CONTENT_LENGTH': 0L,\n 'CONTENT_TYPE': None,\n 'GATEWAY_INTERFACE': 'CGI/1.1',\n 'HTTP_ACCEPT': 'text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5',\n 'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7',\n 'HTTP_ACCEPT_ENCODING': 'gzip,deflate',\n 'HTTP_ACCEPT_LANGUAGE': 'en-us,en;q=0.5',\n 'HTTP_CONNECTION': 'keep-alive',\n 'HTTP_CONTENT_LENGTH': '183',\n 'HTTP_CONTENT_TYPE': 'application/x-www-form-urlencoded',\n 'HTTP_COOKIE': '__utma=31447357.75162487.1190814788.1191270710.1191342621.14; sessionid=a902ef4876d82a08a6979ca0f9d65957; __utmz=31447357.1190814788.1.1.utmccn=(direct)|utmcsr=(direct)|utmcmd=(none); __utmb=31447357; __utmc=31447357',\n 'HTTP_HOST': 'satchmo.chakujiu',\n 'HTTP_KEEP_ALIVE': '300',\n 'HTTP_REFERER': 'http://satchmo.chakujiu/product/ST3500601XS-RK/',\n 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.6) Gecko/20070723 Iceweasel/2.0.0.6 (Debian-2.0.0.6-1)',\n 'PATH_INFO': '/post/',\n 'PATH_TRANSLATED': None,\n 'QUERY_STRING': None,\n 'REMOTE_ADDR': '192.168.0.104',\n 'REMOTE_HOST': None,\n 'REMOTE_IDENT': None,\n 'REMOTE_USER': None,\n 'REQUEST_METHOD': 'POST',\n 'SCRIPT_NAME': None,\n 'SERVER_NAME': 'satchmo.chakujiu',\n 'SERVER_PORT': 0,\n 'SERVER_PROTOCOL': 'HTTP/1.1',\n 'SERVER_SOFTWARE': 'mod_python'}>
          security_hash 	
          u'892997a779cfa4e2a88ab8e5a06e3a1f'
          target 	
          u'29:2'
        * /usr/lib/python2.4/site-packages/django/contrib/comments/views/comments.py in save
           101. and old.rating5 == c.rating5 and old.rating6 == c.rating6 \
           102. and old.rating7 == c.rating7 and old.rating8 == c.rating8:
           103. return old
           104. # If the user is leaving a rating, invalidate all old ratings.
           105. if c.rating1 is not None:
           106. old.valid_rating = False
           107. old.save()
           108. c.save() ...
           109. # If the commentor has posted fewer than COMMENTS_FIRST_FEW comments,
           110. # send the comment to the managers.
           111. if self.user_cache.comment_set.count() <= settings.COMMENTS_FIRST_FEW:
           112. message = ungettext('This comment was posted by a user who has posted fewer than %(count)s comment:\n\n%(text)s',
           113. 'This comment was posted by a user who has posted fewer than %(count)s comments:\n\n%(text)s', settings.COMMENTS_FIRST_FEW) % \
           114. {'count': settings.COMMENTS_FIRST_FEW, 'text': c.get_as_text()}
          ▶ Local vars
          Variable 	Value
          c 	
          grey: +1...
          new_data 	
          <QueryDict: {u'comment': [u'+1\r\n'], u'username': [None], u'rating1': [None], u'gonzo': [u'892997a779cfa4e2a88ab8e5a06e3a1f'], u'target': [u'29:2'], u'rating2': [None], u'rating3': [None], u'url': [u'/product/ST3500601XS-RK/'], u'rating4': [None], u'rating5': [None], u'rating_options': [u'c2NhbGU6MS01fFJhdGluZw=='], u'rating8': [None], u'rating7': [None], u'object_id': [u'2'], u'is_public': [True], u'post': [u'Send review'], u'password': [None], u'ip_address': [u'192.168.0.104'], u'options': [u'ra,ip'], u'rating6': [None], u'content_type_id': [u'29']}>
          self 	
          <django.contrib.comments.views.comments.PublicCommentManipulator object at 0x8d40c8c>
          today 	
          datetime.date(2007, 10, 2)
        * /usr/lib/python2.4/site-packages/django/db/models/base.py in save
           252. qn(self._meta.order_with_respect_to.column))
           253. cursor.execute(subsel, (getattr(self, self._meta.order_with_respect_to.attname),))
           254. db_values.append(cursor.fetchone()[0])
           255. record_exists = False
           256. if db_values:
           257. cursor.execute("INSERT INTO %s (%s) VALUES (%s)" % \
           258. (qn(self._meta.db_table), ','.join(field_names),
           259. ','.join(placeholders)), db_values) ...
           260. else:
           261. # Create a new record with defaults for everything.
           262. cursor.execute("INSERT INTO %s (%s) VALUES (%s)" %
           263. (qn(self._meta.db_table), qn(self._meta.pk.column),
           264. connection.ops.pk_default_value()))
           265. if self._meta.has_auto_field and not pk_set:
          ▶ Local vars
          Variable 	Value
          cursor 	
          <django.db.backends.util.CursorDebugWrapper object at 0x8d5070c>
          db_values 	
          [1, u'29', u'2', '', u'+1', None, None, None, None, None, None, None, None, False, u'2007-10-02 14:30:56.192992', True, u'192.168.0.104', False, 1]
          f 	
          <django.db.models.fields.related.ForeignKey object at 0x85dfacc>
          field_names 	
          ['"user_id"', '"content_type_id"', '"object_id"', '"headline"', '"comment"', '"rating1"', '"rating2"', '"rating3"', '"rating4"', '"rating5"', '"rating6"', '"rating7"', '"rating8"', '"valid_rating"', '"submit_date"', '"is_public"', '"ip_address"', '"is_removed"', '"site_id"']
          non_pks 	
          [<django.db.models.fields.related.ForeignKey object at 0x85bbf8c>, <django.db.models.fields.related.ForeignKey object at 0x85bbfcc>, <django.db.models.fields.IntegerField object at 0x85c00ac>, <django.db.models.fields.CharField object at 0x85c044c>, <django.db.models.fields.TextField object at 0x85c0bac>, <django.db.models.fields.PositiveSmallIntegerField object at 0x85c532c>, <django.db.models.fields.PositiveSmallIntegerField object at 0x85c5aac>, <django.db.models.fields.PositiveSmallIntegerField object at 0x85ca22c>, <django.db.models.fields.PositiveSmallIntegerField object at 0x85ca98c>, <django.db.models.fields.PositiveSmallIntegerField object at 0x85ce10c>, <django.db.models.fields.PositiveSmallIntegerField object at 0x85ce86c>, <django.db.models.fields.PositiveSmallIntegerField object at 0x85cefcc>, <django.db.models.fields.PositiveSmallIntegerField object at 0x85d274c>, <django.db.models.fields.BooleanField object at 0x85d2eac>, <django.db.models.fields.DateTimeField object at 0x85d762c>, <django.db.models.fields.BooleanField object at 0x85d7d6c>, <django.db.models.fields.IPAddressField object at 0x85db50c>, <django.db.models.fields.BooleanField object at 0x85dbcac>, <django.db.models.fields.related.ForeignKey object at 0x85dfacc>]
          pk_set 	
          False
          pk_val 	
          None
          placeholders 	
          ['%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s']
          qn 	
          <bound method DatabaseOperations.quote_name of <django.db.backends.postgresql.operations.DatabaseOperations object at 0xb73457cc>>
          raw 	
          False
          record_exists 	
          False
          self 	
          grey: +1...
        * /usr/lib/python2.4/site-packages/django/db/backends/util.py in execute
            12. def __init__(self, cursor, db):
            13. self.cursor = cursor
            14. self.db = db
            15.
            16. def execute(self, sql, params=()):
            17. start = time()
            18. try:
            19. return self.cursor.execute(sql, params) ...
            20. finally:
            21. stop = time()
            22. self.db.queries.append({
            23. 'sql': smart_unicode(sql) % convert_args(params),
            24. 'time': "%.3f" % (stop - start),
            25. })
          ▶ Local vars
          Variable 	Value
          params 	
          [1, u'29', u'2', '', u'+1', None, None, None, None, None, None, None, None, False, u'2007-10-02 14:30:56.192992', True, u'192.168.0.104', False, 1]
          self 	
          <django.db.backends.util.CursorDebugWrapper object at 0x8d5070c>
          sql 	
          u'INSERT INTO "comments_comment" ("user_id","content_type_id","object_id","headline","comment","rating1","rating2","rating3","rating4","rating5","rating6","rating7","rating8","valid_rating","submit_date","is_public","ip_address","is_removed","site_id") VALUES (%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s)'
          start 	
          1191342656.1931059
          stop 	
          1191342656.201036
    
    Traceback (most recent call last):
    File "/usr/lib/python2.4/site-packages/django/core/handlers/base.py" in _real_get_response
      81. response = callback(request, *callback_args, **callback_kwargs)
    File "/home/grey/src/testbox/satchmo/shop/views/comments.py" in post_rating
      20. response = post_comment(request)
    File "/usr/lib/python2.4/site-packages/django/contrib/comments/views/comments.py" in post_comment
      256. comment = manipulator.save(new_data)
    File "/usr/lib/python2.4/site-packages/django/contrib/comments/views/comments.py" in save
      108. c.save()
    File "/usr/lib/python2.4/site-packages/django/db/models/base.py" in save
      259. ','.join(placeholders)), db_values)
    File "/usr/lib/python2.4/site-packages/django/db/backends/util.py" in execute
      19. return self.cursor.execute(sql, params)
    
      IntegrityError at /comments/post/
      insert or update on table "comments_comment" violates foreign key constraint "comments_comment_site_id_fkey" DETAIL: Ключ (site_id)=(1) отсутствует в таблице "django_site".
    

    Is it possible to turn off this comments at all ?

  3. Anonymous

    without apache2+mod_python :

    Traceback (most recent call last):
    
      File "/usr/lib/python2.4/site-packages/django/core/servers/basehttp.py", line 278, in run
        self.result = application(self.environ, self.start_response)
    
      File "/usr/lib/python2.4/site-packages/django/core/servers/basehttp.py", line 620, in __call__
        return self.application(environ, start_response)
    
      File "/usr/lib/python2.4/site-packages/django/core/handlers/wsgi.py", line 205, in __call__
        dispatcher.send(signal=signals.request_finished)
    
      File "/usr/lib/python2.4/site-packages/django/dispatch/dispatcher.py", line 358, in send
        sender=sender,
    
      File "/usr/lib/python2.4/site-packages/django/dispatch/robustapply.py", line 47, in robustApply
        return receiver(*arguments, **named)
    
      File "/usr/lib/python2.4/site-packages/django/db/backends/__init__.py", line 28, in close
        self.connection.close()
    
    InterfaceError: connection already closed
    
  4. Log in to comment