-2

I cannot run any bzr command anymore after having updating Python 2.7 to Python 3.5

# bzr               
 File "/usr/bin/bzr", line 49
except locale.Error, e:
                   ^ SyntaxError: invalid syntax

Looking around line 49, one finds:

enter image description here

LC_ALL is set to an empty string.

user123456
  • 2,378

2 Answers2

1

Line 49 is except locale.Error, e: and in you screenshot it reads: except locale.Erro-, e:

Ron
  • 20,638
0

The error comes from the fact that Python uses another syntax for expeption

  • Python2.7: except locale.Error, e:
  • Python3: except locale.Error as e:

It is possible to change the expression but I prefered changing the first line of /usr/bin/bzr from #!/usr/bin/python to #!/usr/bin/python2.6 since my python command point to a +3.0 version.

user123456
  • 2,378