简体   繁体   中英

Type error problem with django, apache and mod_wsgi

I've this problem with my django code.

TypeError at /conto/partitario/cerca/

unsupported operand type(s) for +: 'Decimal' and 'Decimal'

Request Method:     GET
Request URL:    http://myurl.com/cerca/
Exception Type:     TypeError
Exception Value:    

unsupported operand type(s) for +: 'Decimal' and 'Decimal'

On my pc this error has never presented but on production server i've this error frequently on the same page. On the server if i reload or restart apache the error disappear for 3/4 hours and then come back!!!

Any Idea??

Thanks!

After some research i find a tip on this ticket http://code.djangoproject.com/ticket/10933 and i apply this patch. For four days my software goes fine but yesterday the error come back!!! Here my code: movim =

conto.movimentocont_set.filter(testata__data_registrazione__lte=data2,testata__data_registrazione__gte=data1).order_by('testata__data_registrazione')

                for mov in movim:

                    dare = dn(dare)  + dn(mov.dare)<----- error on this line????

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM