I'm meeting a weird problem in a django application.
It works w/o any problem from my pc connecting remotely to my customer's
apache but is not working inside the lan.
I'm connecting from firefox/ubuntu they're connecting from firefox/XP.
the weird part is that:
1. they have being working w/o probelms for 10 days and no modifications
where made
2. the error complains "can't adapt" as if trying to insert wrong types
into the db, but the error trace shows the values are correct
3. a restart of apache fixes the problem
4. this is the second time the error happens...
Any hints?
TIA
sandro
*:-)
Hi,
once again I stumble into this problem. This time I gathered some
more
info so I describe them.
I try to insert a record it fails from a Windows pc with Firefox
(and
IE). It works from linux (firefox or galeon).
When it fails the error message is "can't adapt" but
1. the params in the log are:
('2007-10-26 08:50:03.651993', '2007-10-26 08:50:03.652039', 1, 17,
'2007-10-26', u'2', Decimal("100"), 'h', u'prova in fi'
2. from my linux box I print params before a *working* insert and I
get:
['2007-10-26 09:17:44.744656', '2007-10-26 09:17:44.744682', 1, 17,
'2007-10-26', u'2', Decimal("100"), 'h', u'prova']
Not realy different!!!!
3. When it fails the database is not hit. Db is postgres and I
switched on
statement log on every log:
log_min_duration_statement = 0
4. If I restart apache the error is fixed
I'm running mod_wsgi
What should I do, next time it happens to better investigate. It's
already
happened 4 times in 2 months and I cannot just accept it...
Thanks for any possible help
sandro
*:-)
the insert statement that worked follows:
INSERT INTO
"timereport_report" ("date_create","date_last_modify","status","user_id","date","job_id","qty","unit","description")
VALUES ('2007-10-26 10:09:07.721575','2007-10-26 10:09:07.721619',
1,17,'2007-10-26','2',100,'h','prova in fi2')
what makes my case different from this is that the same code creates
probelm from one browser and not from another in a repeatable way. Both are
firefox but running on linux (no probelma) or windows (can't adapt).
I didn't solve it, but it's a month it doesn't happen again...
sandro
*:-)
http://groups.google.com/group/django-users/browse_thread/thread/091aa6c088f6c090
I understand you're running wsgi rather than mod_python, but if you're
running multiple interpreters, you'll still have the problem discussed
there.
Your issue is (apparently) something to do with encoding, and that's
different than Sandro's issue.
Please include more information, especially if you do decide to file a
ticket. I can't help with the info given so far...
correct
> running multiple interpreters, you'll still have the problem discussed
> there.
but that server only has 1 django project (and nothing more). In other
servers I have many concurrent django process but probably I'm not using
decimal.
The link you reported are very interesting but do not explain me why I'm
meeting probelms from all machines on the LAN and not from mine (or from
Windows and not from Linux, but these conditions overlap...).
sandro
*:-)
I'll try this. I tried to do a force_unicode() on slughifi output, but
without luck. I'll try with str() instead.
--
Jarek Zgoda
Skype: jzgoda | GTalk: zg...@jabber.aster.pl | voice: +48228430101
"We read Knuth so you don't have to." (Tim Peters)