#10933: Avoid " TypeError: Cannot convert Decimal("0.0000") to Decimal  " when 
the
decimal module has been reloaded
-------------------------------------+-------------------------------------
     Reporter:  gagravarr            |                    Owner:  nobody
         Type:  Bug                  |                   Status:  new
    Component:  Database layer       |                  Version:  1.3
  (models, ORM)                      |               Resolution:
     Severity:  Normal               |             Triage Stage:  Accepted
     Keywords:  dceu2011             |      Needs documentation:  0
    Has patch:  1                    |  Patch needs improvement:  0
  Needs tests:  1                    |                    UI/UX:  0
Easy pickings:  0                    |
-------------------------------------+-------------------------------------
Changes (by MaDeuce):

 * cc: MaDeuce (added)


Comment:

 Replying to [comment:22 jonaskoelker]:
 >
 
http://code.google.com/p/modwsgi/wiki/ApplicationIssues#Multiple_Python_Sub_Interpreters
 explicitly mentions decimal.Decimal in the context of psycopg2.  I'm
 experiencing this problem using sqlite3 as my database, so it's obviously
 not limited to PostgreSQL.  I think this explains why the
 workaround/solution in comment:15 works.  HTH :-)

 Like jonaskoelker, I'm using sqlite3 with Django 1.3, mod_wsgi 3.3, and
 have the problem.  Unfortunately, modifying my httpd.conf to align with
 that of comment:15 does not make the problem go away.  I will try the
 patch offered in comment:18, as I'm out of other ideas.  However, since I
 don't understand what is causing mod_wsgi to reload Decimal in the first
 place, I don't have much confidence that it will resolve my specific
 problem (even though it may indeed resolve the psycopg2 problem).  If
 someone could offer pointers as to how to track down the root cause of the
 reload, I'd be highly appreciative.  I can only reproduce after about an
 hour of intense load on a production system, so it's difficult to conduct
 experiments.  I'm also a little concerned that the fix of comment:18 is
 1.5 years old and (AFAICT) has not been incorporated into the Django code
 base; are there any negative side-effects?

-- 
Ticket URL: <https://code.djangoproject.com/ticket/10933#comment:23>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to