On Feb 5, 2010, at 11:22 PM, Kevin Ar18 wrote:

> So, I'm using PG8000 1.07 and SqlAlchemy 0.6beta1dev_r6718 and I get this 
> error:
> 
> UnicodeDecodeError: 'ascii' codec can't decode byte 0x8d in position 3: 
> ordinal
> not in range(128)
> 
> I saw a past message about this same thing that said to use a newer version 
> of PG8000
> 
> Well, as far as I can tell, version 1.07 should be new enough right?

Nope.  Use the latest git trunk of pg8000, 1.07 has bugs.   Note it was 
released on Jan 9 2009.


> Also, I have the following version of SQLAlchemy: 
> SQLAlchemy-0.6beta1dev_r6718-py2.6.egg
> 
> 
> And finally, some code:
> 
> from elixir import *
> 
> metadata.bind = "postgresql+pg8000://postgres:p...@localhost:port/db"
> 
> class Table(Entity):
>     entry_date = Field(DateTime, primary_key=True)
> 
> setup_all()
> create_all()
> 
> And, the error:
> Traceback (most recent call last):
>   File "database.py", line 36, in <module>
>     create_all()
>   File "...Python\lib\site-packages\elixir-0.7.1-py2.6.egg\elixi
> r\__init__.py", line 76, in create_all
>   File "...Python\lib\site-packages\sqlalchemy-0.6beta1dev_r6718
> -py2.6.egg\sqlalchemy\schema.py", line 1934, in create_all
>     bind.create(self, checkfirst=checkfirst, tables=tables)
>   File "...Python\lib\site-packages\sqlalchemy-0.6beta1dev_r6718
> -py2.6.egg\sqlalchemy\engine\base.py", line 1393, in create
>     self._run_visitor(ddl.SchemaGenerator, entity, connection=connection, 
> **kwar
> gs)
>   File "...Python\lib\site-packages\sqlalchemy-0.6beta1dev_r6718
> -py2.6.egg\sqlalchemy\engine\base.py", line 1424, in _run_visitor
>     visitorcallable(self.dialect, conn, **kwargs).traverse(element)
>   File "...Python\lib\site-packages\sqlalchemy-0.6beta1dev_r6718
> -py2.6.egg\sqlalchemy\sql\visitors.py", line 86, in traverse
>     return traverse(obj, self.__traverse_options__, self._visitor_dict)
>   File "...Python\lib\site-packages\sqlalchemy-0.6beta1dev_r6718
> -py2.6.egg\sqlalchemy\sql\visitors.py", line 197, in traverse
>     return traverse_using(iterate(obj, opts), obj, visitors)
>   File "...Python\lib\site-packages\sqlalchemy-0.6beta1dev_r6718
> -py2.6.egg\sqlalchemy\sql\visitors.py", line 191, in traverse_using
>     meth(target)
>   File "...Python\lib\site-packages\sqlalchemy-0.6beta1dev_r6718
> -py2.6.egg\sqlalchemy\engine\ddl.py", line 36, in visit_metadata
>     collection = [t for t in sql_util.sort_tables(tables) if 
> self._can_create(t)
> ]
>   File "...Python\lib\site-packages\sqlalchemy-0.6beta1dev_r6718
> -py2.6.egg\sqlalchemy\engine\ddl.py", line 29, in _can_create
>     return not self.checkfirst or not self.dialect.has_table(self.connection, 
> ta
> ble.name, schema=table.schema)
>   File "...Python\lib\site-packages\sqlalchemy-0.6beta1dev_r6718
> -py2.6.egg\sqlalchemy\dialects\postgresql\base.py", line 655, in has_table
>     type_=sqltypes.Unicode)]
>   File "...Python\lib\site-packages\sqlalchemy-0.6beta1dev_r6718
> -py2.6.egg\sqlalchemy\engine\base.py", line 1035, in execute
>     return Connection.executors[c](self, object, multiparams, params)
>   File "...Python\lib\site-packages\sqlalchemy-0.6beta1dev_r6718
> -py2.6.egg\sqlalchemy\engine\base.py", line 1097, in _execute_clauseelement
>     return self.__execute_context(context)
>   File "...Python\lib\site-packages\sqlalchemy-0.6beta1dev_r6718
> -py2.6.egg\sqlalchemy\engine\base.py", line 1120, in __execute_context
>     self._cursor_execute(context.cursor, context.statement, 
> context.parameters[0
> ], context=context)
>   File "...Python\lib\site-packages\sqlalchemy-0.6beta1dev_r6718
> -py2.6.egg\sqlalchemy\engine\base.py", line 1180, in _cursor_execute
>     self.dialect.do_execute(cursor, statement, parameters, context=context)
>   File "...Python\lib\site-packages\sqlalchemy-0.6beta1dev_r6718
> -py2.6.egg\sqlalchemy\engine\default.py", line 220, in do_execute
>     cursor.execute(statement, parameters)
>   File "...Python\lib\site-packages\pg8000-1.07.egg\pg8000\dbapi
> .py", line 243, in _fn
>     return fn(self, *args, **kwargs)
>   File "...Python\lib\site-packages\pg8000-1.07.egg\pg8000\dbapi
> .py", line 312, in execute
>     self._execute(operation, args)
>   File "...Python\lib\site-packages\pg8000-1.07.egg\pg8000\dbapi
> .py", line 317, in _execute
>     self.cursor.execute(new_query, *new_args)
>   File "...Python\lib\site-packages\pg8000-1.07.egg\pg8000\inter
> face.py", line 303, in execute
>     self._stmt = PreparedStatement(self.connection, query, statement_name="", 
> *[
> {"type": type(x), "value": x} for x in args])
>   File "...Python\lib\site-packages\pg8000-1.07.egg\pg8000\inter
> face.py", line 108, in __init__
>     self._parse_row_desc = self.c.parse(self._statement_name, statement, 
> types)
>   File "...Python\lib\site-packages\pg8000-1.07.egg\pg8000\proto
> col.py", line 918, in _fn
>     return fn(self, *args, **kwargs)
>   File "...Python\lib\site-packages\pg8000-1.07.egg\pg8000\proto
> col.py", line 1069, in parse
>     self._send(Parse(statement, qs, param_types))
>   File "...Python\lib\site-packages\pg8000-1.07.egg\pg8000\proto
> col.py", line 975, in _send
>     data = msg.serialize()
>   File "...Python\lib\site-packages\pg8000-1.07.egg\pg8000\proto
> col.py", line 121, in serialize
>     val = struct.pack("!i", len(val) + 4) + val
> UnicodeDecodeError: 'ascii' codec can't decode byte 0x8d in position 3: 
> ordinal
> not in range(128)
> 
> Hotmail: Trusted email with Microsoft’s powerful SPAM protection. Sign up now.
> -- 
> You received this message because you are subscribed to the Google Groups 
> "sqlalchemy" group.
> To post to this group, send email to sqlalch...@googlegroups.com.
> To unsubscribe from this group, send email to 
> sqlalchemy+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/sqlalchemy?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalch...@googlegroups.com.
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.

Reply via email to