Getting "except ManifestInvalidRevisionError, e:" upon initializing a repo from Code Aurora

Viewed 1254

I am running a git command for creating a repo inside folder

repo init -u git://codeaurora.org/quic/le/le/manifest.git -b release -m <manifest-file>.xml --repo-url=git://codeaurora.org/tools/repo.git --repo-branch=caf-stable

but I am getting the following error

  File "/home/user/parent/folder/.repo/repo/main.py", line 126
    except ManifestInvalidRevisionError, e:
                                    ^
SyntaxError: invalid syntax

At some other times, I also got the following:

 File "/home/user/parent/folder/.repo/repo/main.py", line 56, in <module>
    from subcmds.version import Version
  File "/home/user/parent/folder/.repo/repo/subcmds/__init__.py", line 38, in <module>
    ['%s' % name])
  File "/home/user/parent/folder/.repo/repo/subcmds/upload.py", line 27, in <module>
    from hooks import RepoHook
  File "/home/user/parent/folder/.repo/repo/hooks.py", line 472
    file=sys.stderr)
^
SyntaxError: invalid syntax

and I see a warning regarding upgrading to python 3.6+.

Not sure what's causing it. Is it possibly related to a python version?

2 Answers

I resolved issue by cloning repo again and set Permission & PATH. git clone git://codeaurora.org/tools/repo.git

sudo chmod 777 repo

export PATH=/repo/:PATH

The issue is two different version of repo. In my case I installed the latest from google: https://storage.googleapis.com/git-repo-downloads/repo and in the repo init command, downloads it from here: git://codeaurora.org/tools/repo.git

Get the latest repo version from Google, and omit this variable "--repo-url" from your repo init command.

Related