Problems with statements using Decimal class
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
oursql |
New
|
Undecided
|
Unassigned |
Bug Description
I am using Ubuntu Linux 10.10 and using the binary packages of MySQL included in the distro.
Also using python 2.6.6 with oursql 0.9.2.
And this is the stuff that resulted as a traceback, please notice since this is a web project it was extracted from Apache error logs:
Traceback (most recent call last):
[Fri Feb 04 15:30:34 2011] [error] File "/usr/lib/
[Fri Feb 04 15:30:34 2011] [error] self.main()
[Fri Feb 04 15:30:34 2011] [error] File "/usr/lib/
[Fri Feb 04 15:30:34 2011] [error] body = page_handler(
[Fri Feb 04 15:30:34 2011] [error] File "/usr/lib/
[Fri Feb 04 15:30:34 2011] [error] return fn(*args, **kw)
[Fri Feb 04 15:30:34 2011] [error] File "<string>", line 3, in agregar
[Fri Feb 04 15:30:34 2011] [error] File "/usr/lib/
[Fri Feb 04 15:30:34 2011] [error] *args, **kw)
[Fri Feb 04 15:30:34 2011] [error] File "/usr/lib/
[Fri Feb 04 15:30:34 2011] [error] @abstract()
[Fri Feb 04 15:30:34 2011] [error] File "<generated code>", line 0, in run_with_
[Fri Feb 04 15:30:34 2011] [error] File "/usr/lib/
[Fri Feb 04 15:30:34 2011] [error] return self.body(*args, **kw)
[Fri Feb 04 15:30:34 2011] [error] File "/usr/lib/
[Fri Feb 04 15:30:34 2011] [error] retval = func(*args, **kw)
[Fri Feb 04 15:30:34 2011] [error] File "/usr/lib/
[Fri Feb 04 15:30:34 2011] [error] @abstract()
[Fri Feb 04 15:30:34 2011] [error] File "<generated code>", line 0, in _expose
[Fri Feb 04 15:30:34 2011] [error] File "/usr/lib/
[Fri Feb 04 15:30:34 2011] [error] return self.body(*args, **kw)
[Fri Feb 04 15:30:34 2011] [error] File "/usr/lib/
[Fri Feb 04 15:30:34 2011] [error] fragment, options, args, kw)))
[Fri Feb 04 15:30:34 2011] [error] File "/usr/lib/
[Fri Feb 04 15:30:34 2011] [error] output = errorhandling.
[Fri Feb 04 15:30:34 2011] [error] File "/usr/lib/
[Fri Feb 04 15:30:34 2011] [error] return func(self, *args, **kw)
[Fri Feb 04 15:30:34 2011] [error] File "<string>", line 3, in agregar
[Fri Feb 04 15:30:34 2011] [error] File "/usr/lib/
[Fri Feb 04 15:30:34 2011] [error] return errorhandling.
[Fri Feb 04 15:30:34 2011] [error] File "/usr/lib/
[Fri Feb 04 15:30:34 2011] [error] return func(self, *args, **kw)
[Fri Feb 04 15:30:34 2011] [error] File "/home/
[Fri Feb 04 15:30:34 2011] [error] devolucion.flush()
[Fri Feb 04 15:30:34 2011] [error] File "/usr/local/
[Fri Feb 04 15:30:34 2011] [error] return object_
[Fri Feb 04 15:30:34 2011] [error] File "/usr/local/
[Fri Feb 04 15:30:34 2011] [error] self._flush(
[Fri Feb 04 15:30:34 2011] [error] File "/usr/local/
[Fri Feb 04 15:30:34 2011] [error] flush_context.
[Fri Feb 04 15:30:34 2011] [error] File "/usr/local/
[Fri Feb 04 15:30:34 2011] [error] rec.execute(self)
[Fri Feb 04 15:30:34 2011] [error] File "/usr/local/
[Fri Feb 04 15:30:34 2011] [error] uow
[Fri Feb 04 15:30:34 2011] [error] File "/usr/local/
[Fri Feb 04 15:30:34 2011] [error] execute(statement, params)
[Fri Feb 04 15:30:34 2011] [error] File "/usr/local/
[Fri Feb 04 15:30:34 2011] [error] params)
[Fri Feb 04 15:30:34 2011] [error] File "/usr/local/
[Fri Feb 04 15:30:34 2011] [error] return self.__
[Fri Feb 04 15:30:34 2011] [error] File "/usr/local/
[Fri Feb 04 15:30:34 2011] [error] context.
[Fri Feb 04 15:30:34 2011] [error] File "/usr/local/
[Fri Feb 04 15:30:34 2011] [error] context)
[Fri Feb 04 15:30:34 2011] [error] File "/usr/local/
[Fri Feb 04 15:30:34 2011] [error] cursor.
[Fri Feb 04 15:30:34 2011] [error] File "cursor.pyx", line 122, in oursql.
[Fri Feb 04 15:30:34 2011] [error] File "statement.pyx", line 382, in oursql.
[Fri Feb 04 15:30:34 2011] [error] TypeError: cannot bind <class 'decimal.Decimal'> object
The problem is that this is raised just sometimes, at other moments it all goes normally
I don't see how this can be possible. The code is literally: