encoding error in production with WSGI but not development

2013-12-27 Thread rok
Hi, I am getting the following error:

'ascii' codec can't encode character u'\u0160' in position 13: ordinal not 
in range(128)

in our production machine running the Django app using Apache+mod_wsgi. 
However, the same code works well in development in Eclipse. Is this 
somehow related to the WSGI config or a PYTHON path in the production 
machine?
Thanks!

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/b14943d1-1cb6-4958-8759-016617c46ed0%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Encoding error

2012-11-12 Thread Ariz-maN@
Hi,
i'm coding a system using Django Pyodbc and SQL Server 2005.
But i've a problem of encoding when i try to save some complex string like 
"éei«éíπ≤Æ∫" in sql server through pyodbc.
The error was always "'not enough arguments for format string'"

i've identified the line in the file base.py in pyodbc folder : 

if isinstance(p, unicode):
> if self.driver_needs_utf8:
> # FreeTDS (and other ODBC drivers?) doesn't support 
> Unicode
> # yet, so we need to encode parameters in utf-8
> fp.append(p.encode('utf-8'))
> else:
> fp.append(p)
> elif isinstance(p, str):
> if self.driver_needs_utf8:
> # TODO: use system encoding when calling decode()?
> *fp.append(p.decode('utf-8').encode('utf-8'))*
> else:
> fp.append(p)
> elif isinstance(p, type(True)):
> if p:
> fp.append(1)
> else:
> fp.append(0)
> else:
> fp.append(p)
>

Can anyone help me ?

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/XyjqLX9YR28J.
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.