bazaar command giving except locale.Error , e

Sometimes bazaar throws below error whenever there is change in python version.This happens since the exception handling between two python versions has changed or different.

  File "/home/bzr-2.7.0/bin/bzr", line 50
    except locale.Error, e:
                       ^
SyntaxError: invalid syntax

So you need to use the correct version to resolve the issue.So you need to shebang to the correct python in bzr file. So change the first line of bzr file suitably.

#!/usr/bin/python3.6   -->    #!/usr/bin/python2.6 

Leave a Reply