0 Replies Latest reply on Aug 15, 2012 10:38 AM by 537206

    dbxml django mod_wsgi not working with error: 'finally' pops bad exception

      Dear experts

      I have a python/django application, 'mysite', which connects to bdbxml. The application works fine using the django development server but fails when run using mod_wsgi with apache - my chosen route for production. Specifically it is the parts of the application that connect to the database that fail with a very unhelpful message, 'finally' pops bad exception.

      I believe from googling that this error is a generic error that is generated by C++ applications when there is no other error message to generate, but I am not a C++ expert so don't really know what it means.

      My views.py function looks like:

      def dbquery(request):
           mgr = XmlManager()
           container = mgr.openContainer("/wsgi/mysite/mysite.bdbxml")
           results = container.getAllDocuments(0)
           for value in results:
                document = value.asDocument()
                return HttpResponse (document.getName())

      my django.wsgi file (using the suggested format from Graham Dumpleton) looks like:

      import os, sys


      import settings

      import django.core.management
      utility = django.core.management.ManagementUtility()
      command = utility.fetch_command('runserver')


      import django.conf
      import django.utils


      import django.core.handlers.wsgi

      application = django.core.handlers.wsgi.WSGIHandler()

      and httpd.conf looks like:

      WSGIApplicationGroup %{GLOBAL}

      WSGIScriptAlias / /wsgi/mysite/apache/django.wsgi

      <Directory /wsgi/mysite>
      Order deny,allow
      Allow from all

      Does anyone know how to solve this problem?


      Edited by: dbxml_explorer on Aug 15, 2012 11:31 AM

      Edited by: dbxml_explorer on Aug 15, 2012 11:36 AM

      Edited by: dbxml_explorer on Aug 15, 2012 11:37 AM