This is a known issue in MySQL connector. I'd stick to python 2 for now as the MySQL drivers are not yet in great shape on python 3.
Sent from my iPhone On Mar 22, 2012, at 8:08 AM, shinriyo <shinr...@gmail.com> wrote: > Hi. > > I had similar bug you wrote > did you resolve? > > I used Python3.2 and mysqlconnector > > Traceback (most recent call last): > File > "/Users/shinriyo/ve/fb_env/lib/python3.2/site-packages/sqlalchemy/pool.py", > line 717, in _do_get > return self._pool.get(wait, self._timeout) > File > "/Users/shinriyo/ve/fb_env/lib/python3.2/site-packages/sqlalchemy/util/queue.py", > line 137, in get > raise Empty > sqlalchemy.util.queue.Empty > > During handling of the above exception, another exception occurred: > > Traceback (most recent call last): > File "/opt/python-3.2.2/lib/python3.2/runpy.py", line 160, in > _run_module_as_main > "__main__", fname, loader, pkg_name) > File "/opt/python-3.2.2/lib/python3.2/runpy.py", line 73, in _run_code > exec(code, run_globals) > File "/Users/shinriyo/ve/fb_env/tmp/teaspoon/__main__.py", line 78, in > <module> > eval(argv[1])() > File "/Users/shinriyo/ve/fb_env/tmp/teaspoon/__main__.py", line 46, in > create > __create__() > File "./models/__init__.py", line 29, in <lambda> > __create__ = lambda: (setattr(engine, 'echo', True), > metadata.create_all(engine)) > File > "/Users/shinriyo/ve/fb_env/lib/python3.2/site-packages/sqlalchemy/schema.py", > line 2556, in create_all > tables=tables) > File > "/Users/shinriyo/ve/fb_env/lib/python3.2/site-packages/sqlalchemy/engine/base.py", > line 2291, in _run_visitor > conn = self.contextual_connect(close_with_result=False) > File > "/Users/shinriyo/ve/fb_env/lib/python3.2/site-packages/sqlalchemy/engine/base.py", > line 2478, in contextual_connect > self.pool.connect(), > File > "/Users/shinriyo/ve/fb_env/lib/python3.2/site-packages/sqlalchemy/pool.py", > line 224, in connect > return _ConnectionFairy(self).checkout() > File > "/Users/shinriyo/ve/fb_env/lib/python3.2/site-packages/sqlalchemy/pool.py", > line 387, in __init__ > rec = self._connection_record = pool._do_get() > File > "/Users/shinriyo/ve/fb_env/lib/python3.2/site-packages/sqlalchemy/pool.py", > line 739, in _do_get > con = self._create_connection() > File > "/Users/shinriyo/ve/fb_env/lib/python3.2/site-packages/sqlalchemy/pool.py", > line 188, in _create_connection > return _ConnectionRecord(self) > File > "/Users/shinriyo/ve/fb_env/lib/python3.2/site-packages/sqlalchemy/pool.py", > line 273, in __init__ > pool.dispatch.first_connect.exec_once(self.connection, self) > File > "/Users/shinriyo/ve/fb_env/lib/python3.2/site-packages/sqlalchemy/event.py", > line 279, in exec_once > self(*args, **kw) > File > "/Users/shinriyo/ve/fb_env/lib/python3.2/site-packages/sqlalchemy/event.py", > line 288, in __call__ > fn(*args, **kw) > File > "/Users/shinriyo/ve/fb_env/lib/python3.2/site-packages/sqlalchemy/engine/strategies.py", > line 168, in first_connect > dialect.initialize(c) > File > "/Users/shinriyo/ve/fb_env/lib/python3.2/site-packages/sqlalchemy/dialects/mysql/base.py", > line 1977, in initialize > default.DefaultDialect.initialize(self, connection) > File > "/Users/shinriyo/ve/fb_env/lib/python3.2/site-packages/sqlalchemy/engine/default.py", > line 181, in initialize > self._get_default_schema_name(connection) > File > "/Users/shinriyo/ve/fb_env/lib/python3.2/site-packages/sqlalchemy/dialects/mysql/base.py", > line 1942, in _get_default_schema_name > return connection.execute('SELECT DATABASE()').scalar() > File > "/Users/shinriyo/ve/fb_env/lib/python3.2/site-packages/sqlalchemy/engine/base.py", > line 1450, in execute > params) > File > "/Users/shinriyo/ve/fb_env/lib/python3.2/site-packages/sqlalchemy/engine/base.py", > line 1627, in _execute_text > statement, parameters > File > "/Users/shinriyo/ve/fb_env/lib/python3.2/site-packages/sqlalchemy/engine/base.py", > line 1716, in _execute_context > result = context.get_result_proxy() > File > "/Users/shinriyo/ve/fb_env/lib/python3.2/site-packages/sqlalchemy/engine/default.py", > line 646, in get_result_proxy > return base.ResultProxy(self) > File > "/Users/shinriyo/ve/fb_env/lib/python3.2/site-packages/sqlalchemy/engine/base.py", > line 2892, in __init__ > self._init_metadata() > File > "/Users/shinriyo/ve/fb_env/lib/python3.2/site-packages/sqlalchemy/engine/base.py", > line 2899, in _init_metadata > self._metadata = ResultMetaData(self, metadata) > File > "/Users/shinriyo/ve/fb_env/lib/python3.2/site-packages/sqlalchemy/engine/base.py", > line 2750, in __init__ > if primary_keymap.setdefault(name.lower(), rec) is not rec: > TypeError: unhashable type: 'bytearray' > (fb_env)shinriyo:teaspoon shinriyo$ > > -- > You received this message because you are subscribed to the Google Groups > "sqlalchemy" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/sqlalchemy/-/HUeEsiNkc3IJ. > To post to this group, send email to sqlalchemy@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 sqlalchemy@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.