Open GoogleCodeExporter opened 9 years ago
Hello,
I have the same problem.
In my table, i have colum name with accentuated caracter. It not a problem on a
classic run. But on declarative mode i have an error.
I think it's a Unicode encode probleme.
My postgresql base is on utf8 encoding
The psql command for create table in my test db is :
CREATE TABLE "Com"
(
"Id_GéoFLA" integer,
"Nom_Commune" character varying(50),
"Nom_Commune_Min" character varying(50),
"CodeINSEE" character varying(50),
"Code_Département" character varying(2),
"Code_Commune" character varying(3),
"Code_Canton" integer,
"Nom_Département" character varying(30),
"Code_Région" character varying(2),
"Nom_Région" character varying(30),
"Nom_Pays" character varying(20)
)
my classic command :
> clasic mode
sqlautocode postgresql+psycopg2://jerome@:0/test --output model_test1.py
>>no error
> declarative mode
sqlautocode postgresql+psycopg2://jerome@:0/test --output model_test2.py -d
>>error description
...
File "/usr/local/lib/python2.7/dist-packages/SQLAlchemy-0.7.6-py2.7-linux-x86_64.egg/sqlalchemy/orm/instrumentation.py", line 236, in install_descriptor
setattr(self.class_, key, inst)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 4:
ordinal not in range(128)
Original comment by jerome.s...@gmail.com
on 4 May 2012 at 8:07
Same problem for mssql too.
Original comment by timucink...@gmail.com
on 5 Feb 2013 at 1:09
Original issue reported on code.google.com by
bigras.b...@gmail.com
on 6 Feb 2012 at 3:07