Guest User

Untitled

a guest
Jul 19th, 2018
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.33 KB | None | 0 0
  1. D:\Daria\Python\Python\pytest1\env\Scripts\python.exe D:/Daria/Python/Python/pytest1/check_db_connection.py
  2. Traceback (most recent call last):
  3. GET CONNECTION FROM THE LOCAL POOL
  4. File "D:\Daria\Python\Python\pytest1\env\lib\site-packages\pymysql\converters.py", line 20, in escape_item
  5. SELECT `g`.`group_id`, `g`.`group_name`, `g`.`group_header`, `g`.`group_footer`
  6. encoder = mapping[text_type]
  7. FROM `group_list` `g`
  8. KeyError: <class 'str'>
  9.  
  10. WHERE `g`.`group_id` = %s
  11. During handling of the above exception, another exception occurred:
  12.  
  13. ['161']
  14. Traceback (most recent call last):
  15. File "D:/Daria/Python/Python/pytest1/check_db_connection.py", line 9, in <module>
  16.  
  17. l = db.get_contacts_in_group(Group(id='161'))
  18. SELECT `T1`.`id`
  19. File "<string>", line 2, in get_contacts_in_group
  20. FROM `address_in_groups` `T1`
  21. File "D:\Daria\Python\Python\pytest1\env\lib\site-packages\pony\orm\core.py", line 460, in new_func
  22. try: return func(*args, **kwargs)
  23. File "D:\Daria\Python\Python\pytest1\fixture\orm.py", line 73, in get_contacts_in_group
  24. return self.convert_contacts_to_model(orm_group.contacts)
  25. File "D:\Daria\Python\Python\pytest1\fixture\orm.py", line 62, in convert_contacts_to_model
  26. WHERE `T1`.`group_id` = %s
  27. [161]
  28.  
  29. ROLLBACK
  30. RELEASE CONNECTION
  31. return list(map(convert, contacts))
  32. File "<string>", line 2, in __iter__
  33. File "D:\Daria\Python\Python\pytest1\env\lib\site-packages\pony\utils\utils.py", line 58, in cut_traceback
  34. return func(*args, **kwargs)
  35. File "D:\Daria\Python\Python\pytest1\env\lib\site-packages\pony\orm\core.py", line 3137, in __iter__
  36. return iter(wrapper.copy())
  37. File "<string>", line 2, in copy
  38. File "D:\Daria\Python\Python\pytest1\env\lib\site-packages\pony\utils\utils.py", line 58, in cut_traceback
  39. return func(*args, **kwargs)
  40. File "D:\Daria\Python\Python\pytest1\env\lib\site-packages\pony\orm\core.py", line 3026, in copy
  41. return wrapper._attr_.copy(wrapper._obj_)
  42. File "D:\Daria\Python\Python\pytest1\env\lib\site-packages\pony\orm\core.py", line 2775, in copy
  43. if setdata is None or not setdata.is_fully_loaded: setdata = attr.load(obj)
  44. File "D:\Daria\Python\Python\pytest1\env\lib\site-packages\pony\orm\core.py", line 2704, in load
  45. cursor = database._exec_sql(sql, arguments)
  46. File "D:\Daria\Python\Python\pytest1\env\lib\site-packages\pony\orm\core.py", line 820, in _exec_sql
  47. connection = cache.reconnect(e)
  48. File "D:\Daria\Python\Python\pytest1\env\lib\site-packages\pony\orm\core.py", line 1625, in reconnect
  49. if not provider.should_reconnect(exc): reraise(*sys.exc_info())
  50. File "D:\Daria\Python\Python\pytest1\env\lib\site-packages\pony\utils\utils.py", line 87, in reraise
  51. try: raise exc.with_traceback(tb)
  52. File "D:\Daria\Python\Python\pytest1\env\lib\site-packages\pony\orm\core.py", line 818, in _exec_sql
  53. try: new_id = provider.execute(cursor, sql, arguments, returning_id)
  54. File "<string>", line 2, in execute
  55. File "D:\Daria\Python\Python\pytest1\env\lib\site-packages\pony\orm\dbapiprovider.py", line 50, in wrap_dbapi_exceptions
  56. return func(provider, *args, **kwargs)
  57. File "D:\Daria\Python\Python\pytest1\env\lib\site-packages\pony\orm\dbapiprovider.py", line 255, in execute
  58. else: cursor.execute(sql, arguments)
  59. File "D:\Daria\Python\Python\pytest1\env\lib\site-packages\pymysql\cursors.py", line 168, in execute
  60. query = self.mogrify(query, args)
  61. File "D:\Daria\Python\Python\pytest1\env\lib\site-packages\pymysql\cursors.py", line 147, in mogrify
  62. query = query % self._escape_args(args, conn)
  63. File "D:\Daria\Python\Python\pytest1\env\lib\site-packages\pymysql\cursors.py", line 122, in _escape_args
  64. return tuple(conn.literal(arg) for arg in args)
  65. File "D:\Daria\Python\Python\pytest1\env\lib\site-packages\pymysql\cursors.py", line 122, in <genexpr>
  66. return tuple(conn.literal(arg) for arg in args)
  67. File "D:\Daria\Python\Python\pytest1\env\lib\site-packages\pymysql\connections.py", line 469, in literal
  68. return self.escape(obj, self.encoders)
  69. File "D:\Daria\Python\Python\pytest1\env\lib\site-packages\pymysql\connections.py", line 462, in escape
  70. return converters.escape_item(obj, self.charset, mapping=mapping)
  71. File "D:\Daria\Python\Python\pytest1\env\lib\site-packages\pymysql\converters.py", line 22, in escape_item
  72. raise TypeError("no default type converter defined")
  73. TypeError: no default type converter defined
  74.  
  75. Process finished with exit code 1
Add Comment
Please, Sign In to add comment