Traceback issue regarding .gitstatus.py
My bashrc configuration isn't working as expected. When I enter a folder which is managed by git, I'd expect to see my prompt changing. This is not happening for me. So I was checking the .bash.xx4h.d for debugging and saw this gitstatus.py function there. By executing it, I received following traceback:
python .gitstatus.py
Traceback (most recent call last):
File ".gitstatus.py", line 97, in <module>
folder = folder.split('/')[-1].rstrip()
TypeError: a bytes-like object is required, not 'str'
I'm using python 3.8.0
After changing the line to following it was working again:
folder = folder.decode().split('/')[-1].rstrip()
see, https://stackoverflow.com/questions/29643544/python-a-bytes-like-object-is-required-not-str