#問題
with open('LICENSE.txt', 'rb') as f:
s = [os.path.join('a', line.strip()) for line in f]
#error
#TypeError: Can't mix strings and bytes in path components
#解決
with open('LICENSE.txt', 'rb') as f:
s = [os.path.join(b'a', line.strip()) for line in f]
#原因
バイト列とstrを混同させていた。バイト列にそろえた。