TypeError: a bytes-like object is required, not 'str'

This is for troubleshooting of problems with the FAF client and Forged Alliance game.

Moderator: PhilipJFry

TypeError: a bytes-like object is required, not 'str'

Postby threelegs » 28 Sep 2017, 01:30

Hello im running on linux and i can't login. I can open the client but while trying to log in i get this error
Traceback (most recent call last):
File "/faf-client/src/client/_clientwindow.py", line 937, in on_widget_login_data
if self.send_login(login, password):
File /faf/faf-client/src/client/_clientwindow.py", line 952, in send_login
self.uniqueId = util.uniqueID(self.login, self.session)
File "//faf-client/src/util/__init__.py", line 414, in uniqueID
for line in err.split('\n'):
TypeError: a bytes-like object is required, not 'str'

Runtime info:

FAF Username: pre-login
FAF Version: 0.16.0
FAF Environment: production
FAF Directory: /FAForever
FA Path: : /.wine/dosdevices/c:/Program Files/THQ/Gas Powered Games/Supreme Commander - Forged Alliance
Home Directory:
Platform: Linux-4.12.0--amd64-x86_64-
Uname: uname_result(system='Linux', node='', release='4.12.0-amd64', version='#1 SMP Debian 4.12.6-1 (2017-08-30)', machine='x86_64', processor='')


i removed my home directory and username for security purposes
threelegs
Crusader
 
Posts: 17
Joined: 10 Mar 2016, 17:06
Has liked: 0 time
Been liked: 0 time
FAF User Name: threelegs

Re: TypeError: a bytes-like object is required, not 'str'

Postby Wesmania » 28 Sep 2017, 08:14

Hmm, it seems we made a little error when refactoring this bit of code. I'll make a patch for it, in the meantime you can change the offending "for line in err.split('\n'):" into "for line in err.decode('utf-8')split('\n'):" so that we can get the problem in the logs to debug.

As for the issue itself, my first bet is that your lsblk command doesn't support the --json switch. I'll have to put a reminder in the docs about it. It should be supported in util-linux-2.27 onwards.
Wesmania
Contributor
 
Posts: 391
Joined: 19 Nov 2014, 19:17
Has liked: 2 times
Been liked: 79 times
FAF User Name: MazorNoob


Return to Tech Support

Who is online

Users browsing this forum: No registered users and 1 guest