TypeError: Can't convert 'bytes' object to str implicitly
Closed this issue · 2 comments
za-arthur commented
I get this error if safe_psql() fails:
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/artur/source/pg/rum/tests/pglist_tests.py", line 94, in test_order_by
" FROM pglist "
File "/home/artur/source/pg/rum/tests/pglist_tests.py", line 83, in test_order_by
try:
File "/home/artur/source/pg/rum/tests/rum/lib/python3.5/site-packages/testgres/testgres.py", line 379, in safe_psql
raise ClusterException("psql failed:\n" + err)
TypeError: Can't convert 'bytes' object to str implicitly
----------------------------------------------------------------------
stalkerg commented
Try my version: https://github.com/stalkerg/testgres
If all ok I will push request.
za-arthur commented
It works for me now with your fork:
Traceback (most recent call last):
File "/home/artur/source/pg/rum/tests/pglist_tests.py", line 32, in setUp
self.init_pglist_data(self.node)
File "/home/artur/source/pg/rum/tests/pglist_tests.py", line 74, in init_pglist_data
node.safe_psql("pglist", "CREATE EXTENSION rum")
File "/home/artur/source/pg/rum/tests/rum/lib/python3.5/site-packages/testgres/testgres.py", line 379, in safe_psql
raise ClusterException("psql failed:\n" + six.text_type(err))
testgres.testgres.ClusterException: psql failed:
b'ERROR: could not extend file "base/16384/2691": \xd0\x9d\xd0\xb0 \xd1\x83\xd1\x81\xd1\x82\xd1\x80\xd0\xbe\xd0\xb9\xd1\x81\xd1\x82\xd0\xb2\xd0\xb5 \xd0\xbd\xd0\xb5 \xd0\xbe\xd1\x81\xd1\x82\xd0\xb0\xd0\xbb\xd0\xbe\xd1\x81\xd1\x8c \xd1\x81\xd0\xb2\xd0\xbe\xd0\xb1\xd0\xbe\xd0\xb4\xd0\xbd\xd0\xbe\xd0\xb3\xd0\xbe \xd0\xbc\xd0\xb5\xd1\x81\xd1\x82\xd0\xb0\nHINT: Check free disk space.\n'