-
-
Save alexpodoff/e4b8c69066dcce3a9a579c4040f3a8d2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Z:\devel\python_training\env\Scripts\python.exe Z:/devel/python_training/check_db_connection.py | |
Traceback (most recent call last): | |
File "Z:\devel\python_training\env\lib\site-packages\pymysql\converters.py", line 20, in escape_item | |
encoder = mapping[text_type] | |
KeyError: <class 'str'> | |
During handling of the above exception, another exception occurred: | |
Traceback (most recent call last): | |
File "Z:/devel/python_training/check_db_connection.py", line 7, in <module> | |
somelist = db.get_contacts_in_group(Group(id='50')) | |
File "<string>", line 2, in get_contacts_in_group | |
File "Z:\devel\python_training\env\lib\site-packages\pony\orm\core.py", line 406, in new_func | |
try: return func(*args, **kwargs) | |
File "Z:\devel\python_training\fixture\orm.py", line 56, in get_contacts_in_group | |
return self.convert_contacts_to_model(orm_group.contacts) | |
File "Z:\devel\python_training\fixture\orm.py", line 43, in convert_contacts_to_model | |
return list(map(convert, contacts)) | |
File "<string>", line 2, in __iter__ | |
File "Z:\devel\python_training\env\lib\site-packages\pony\utils\utils.py", line 58, in cut_traceback | |
return func(*args, **kwargs) | |
File "Z:\devel\python_training\env\lib\site-packages\pony\orm\core.py", line 2989, in __iter__ | |
return iter(wrapper.copy()) | |
File "<string>", line 2, in copy | |
File "Z:\devel\python_training\env\lib\site-packages\pony\utils\utils.py", line 58, in cut_traceback | |
return func(*args, **kwargs) | |
File "Z:\devel\python_training\env\lib\site-packages\pony\orm\core.py", line 2880, in copy | |
return wrapper._attr_.copy(wrapper._obj_) | |
File "Z:\devel\python_training\env\lib\site-packages\pony\orm\core.py", line 2628, in copy | |
GET CONNECTION FROM THE LOCAL POOL | |
SELECT `g`.`group_id`, `g`.`group_name`, `g`.`group_header`, `g`.`group_footer` | |
FROM `group_list` `g` | |
WHERE `g`.`group_id` = %s | |
['50'] | |
SELECT `T1`.`id` | |
FROM `address_in_groups` `T1` | |
WHERE `T1`.`group_id` = %s | |
[50] | |
ROLLBACK | |
RELEASE CONNECTION | |
if setdata is None or not setdata.is_fully_loaded: setdata = attr.load(obj) | |
File "Z:\devel\python_training\env\lib\site-packages\pony\orm\core.py", line 2557, in load | |
cursor = database._exec_sql(sql, arguments) | |
File "Z:\devel\python_training\env\lib\site-packages\pony\orm\core.py", line 696, in _exec_sql | |
connection = cache.reconnect(e) | |
File "Z:\devel\python_training\env\lib\site-packages\pony\orm\core.py", line 1504, in reconnect | |
if not provider.should_reconnect(exc): reraise(*sys.exc_info()) | |
File "Z:\devel\python_training\env\lib\site-packages\pony\utils\utils.py", line 85, in reraise | |
try: raise exc.with_traceback(tb) | |
File "Z:\devel\python_training\env\lib\site-packages\pony\orm\core.py", line 694, in _exec_sql | |
try: new_id = provider.execute(cursor, sql, arguments, returning_id) | |
File "<string>", line 2, in execute | |
File "Z:\devel\python_training\env\lib\site-packages\pony\orm\dbapiprovider.py", line 48, in wrap_dbapi_exceptions | |
try: return func(provider, *args, **kwargs) | |
File "Z:\devel\python_training\env\lib\site-packages\pony\orm\dbapiprovider.py", line 240, in execute | |
else: cursor.execute(sql, arguments) | |
File "Z:\devel\python_training\env\lib\site-packages\pymysql\cursors.py", line 164, in execute | |
query = self.mogrify(query, args) | |
File "Z:\devel\python_training\env\lib\site-packages\pymysql\cursors.py", line 143, in mogrify | |
query = query % self._escape_args(args, conn) | |
File "Z:\devel\python_training\env\lib\site-packages\pymysql\cursors.py", line 118, in _escape_args | |
return tuple(conn.literal(arg) for arg in args) | |
File "Z:\devel\python_training\env\lib\site-packages\pymysql\cursors.py", line 118, in <genexpr> | |
return tuple(conn.literal(arg) for arg in args) | |
File "Z:\devel\python_training\env\lib\site-packages\pymysql\connections.py", line 800, in literal | |
return self.escape(obj, self.encoders) | |
File "Z:\devel\python_training\env\lib\site-packages\pymysql\connections.py", line 793, in escape | |
return escape_item(obj, self.charset, mapping=mapping) | |
File "Z:\devel\python_training\env\lib\site-packages\pymysql\converters.py", line 22, in escape_item | |
raise TypeError("no default type converter defined") | |
TypeError: no default type converter defined | |
Process finished with exit code 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment