Thank you very much,
yes, it's the only app (well I have a production and development
version of the same application running there).
The production version is dj 1.0.2
The development version is dj 1.1b - with the trunk version of django-
pyodbc - but I switched to this version in desperate response to this
problem. I hope it's no problem.

Also i found this stuff in vhost configs:
    PythonDebug On
    PythonAutoReload On

So I commented these and added the interpreter directive. And now I'll
try it...

Ales

On Apr 25, 1:17 pm, Graham Dumpleton <graham.dumple...@gmail.com>
wrote:
> Presuming you are only running the one web application on the server,
> do things improve it you add directive:
>
>   PythonInterpreter main_interpreter
>
> to Apache configuration.
>
> If it doesn't, not the same issue as pyscopg2.
>
> Graham
>
> On Apr 25, 9:13 pm, Newt <strejda.n...@gmail.com> wrote:
>
> > I'm running it as mod_python on Ubuntu 8.04 server. I connect to
> > external MSSQL server thru django-pyodbc, the only thing I had to
> > install manually was the pyodbc, the rest was installed using package
> > manager (unix-odbc, freetds). I'm not much a server admin and it was a
> > few months ago.
>
> > Ales
>
> > On Apr 25, 12:40 pm, Graham Dumpleton <graham.dumple...@gmail.com>
> > wrote:
>
> > > On Apr 25, 12:37 am, Newt <strejda.n...@gmail.com> wrote:
>
> > > > Hello,
>
> > > > in my latest application I have models with like 15 Decimal fields,
> > > > with different decimal places.
>
> > > > when I try to save an object of that model, I get sometimes (often,
> > > > but not always) this error:
>
> > > >   File "/home/newt/django/1.0/sites/cdms/item/views.py", line 1054, in
> > > > item_copy
> > > >     object.save()
>
> > > >   File "/home/newt/django/1.0/lib/django/db/models/base.py", line 311,
> > > > in save
>
> > > >   File "/home/newt/django/1.0/lib/django/db/models/base.py", line 371,
> > > > in save_base
>
> > > >   File "/home/newt/django/1.0/lib/django/db/models/fields/
> > > > __init__.py", line 192, in get_db_prep_save
>
> > > >   File "/home/newt/django/1.0/lib/django/db/models/fields/
> > > > __init__.py", line 609, in get_db_prep_value
>
> > > >   File "/home/newt/django/1.0/lib/django/db/models/fields/
> > > > __init__.py", line 583, in to_python
>
> > > >   File "/usr/lib/python2.5/decimal.py", line 650, in __new__
> > > >     raise TypeError("Cannot convert %r to Decimal" % value)
>
> > > > TypeError: Cannot convert Decimal("0.0000") to Decimal
>
> > > > It fails on the first decimal field (at it's only one with 4 decimal
> > > > places) and it just happens sometimes.
> > > > I remember something like that used to happen with psycopg2 some year
> > > > ago.
>
> > > The psycopg2 problem was because the C extension module which is a
> > > part of it wasn't implemented correctly so as to work in a Python sub
> > > interpreter. The problems with that would only manifest when using
> > > mod_python or mod_wsgi and application running in sub interpreter and
> > > not main interpreter.
>
> > > So, to start with, how are you hosting this application?
>
> > > Graham
>
> > > > I think it breaks when it tries to get the data ready for the SQL
> > > > statement.
>
> > > > In this project I have to use django-pyodbc connector to MSSQL
> > > > database.
>
> > > > I have tried both 1.02 and 1.1b branches of the connector with same
> > > > errorous results.
>
> > > > It's the most frustrating bug in django so far, as I'm completely
> > > > helpless and even google's silent about this.
>
> > > > Please does anyone know what's causing this, or how to get rid of
> > > > it...
>
> > > > thanks,
>
> > > > Ales
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to