repo don't work with python 2.7.2?

2,442 views
Skip to first unread message

wjy

unread,
Mar 22, 2012, 1:53:39 AM3/22/12
to Android Building
repo init -u https://android.googlesource.com/platform/manifest
Traceback (most recent call last):
File "/home/htwy/bin/repo", line 91, in <module>
import readline
ImportError: No module named readline

Conley Owens

unread,
Mar 22, 2012, 12:54:14 PM3/22/12
to android-...@googlegroups.com
Did you build your own python?
"pip install readline" is the easiest way to fix this error. You may
need to setup a virtualenv before you can do this though.

~cco3

> --
> You received this message because you are subscribed to the "Android Building" mailing list.
> To post to this group, send email to android-...@googlegroups.com
> To unsubscribe from this group, send email to
> android-buildi...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-building?hl=en

Mathew Says IdareYou

unread,
Mar 22, 2012, 6:55:05 PM3/22/12
to android-...@googlegroups.com

Did you install readline/follow the instructions carefully at http://source.android.com ?

Trickyhacker

unread,
Mar 22, 2012, 11:11:17 PM3/22/12
to Android Building

I think this problem is related to python. If you have installed
python manually, make sure that it is installed properly or you can
just remove it and install it again.

On Mar 22, 1:53 am, wjy <wjy...@gmail.com> wrote:
> repo init -uhttps://android.googlesource.com/platform/manifest

wjy

unread,
Mar 23, 2012, 12:56:52 PM3/23/12
to Android Building
Thank you very much. I used the default python in Ubuntu and
initialized repo.

John Kirk

unread,
Mar 23, 2012, 1:44:18 PM3/23/12
to android-...@googlegroups.com
I too am having trouble with repo sync. I did "which python" and found in /usr/bin "python", "python2", and "python2.6" I tried "sudo update-alternatives --config python" but no alternatives were available. When I try to sudo apt-get remove or autoremove python there is a long list of applications that will be uninstalled with python, so I don't think removing python is an option. How do I choose between "python", "python2" or "python2.6" so that I can get the source?

Conley Owens

unread,
Mar 23, 2012, 4:07:24 PM3/23/12
to android-...@googlegroups.com
On Fri, Mar 23, 2012 at 10:44 AM, John Kirk <jkir...@gmail.com> wrote:
> I too am having trouble with repo sync. I did "which python" and found in
> /usr/bin "python", "python2", and "python2.6" I tried "sudo
> update-alternatives --config python" but no alternatives were available.
> When I try to sudo apt-get remove or autoremove python there is a long list
> of applications that will be uninstalled with python, so I don't think
> removing python is an option. How do I choose between "python", "python2" or
> "python2.6" so that I can get the source?

My guess is that those are all symlinks to eachother...I don't think
there is a difference. What is the problem you are having with `repo
sync`?

>
>
> On Friday, March 23, 2012 10:56:52 AM UTC-6, wjy wrote:
>>
>> Thank you very much. I used the default python in Ubuntu and
>> initialized repo.
>>
>> On 3月23日, 上午11时11分, Trickyhacker <prt...@gmail.com> wrote:
>> > I think this problem is related to python. If you have installed
>> > python manually, make sure that it is installed properly or you can
>> > just remove it and install it again.
>> >
>> > On Mar 22, 1:53 am, wjy <wjy...@gmail.com> wrote:
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> > > repo init -uhttps://android.googlesource.com/platform/manifest
>> > > Traceback (most recent call last):
>> > >   File "/home/htwy/bin/repo", line 91, in <module>
>> > >     import readline
>> > > ImportError: No module named readline
>

Message has been deleted

John Kirk

unread,
Mar 26, 2012, 2:18:16 PM3/26/12
to android-...@googlegroups.com

I made sure I have most recent version of repo and I also have python 2.7.2+. I believe this to be a local issue because I also fail to fetch from github. Of all the repo operations I have tried, about 30, only one has succeeded.

On Mar 26, 2012 10:44 AM, "John Kirk" <jkir...@gmail.com> wrote:
I get:
Fetching projects:  14% (24/170)  Exception in thread Thread-13:
Traceback (most recent call last):
  File "/usr/lib/python2.6/threading.py", line 532, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.6/threading.py", line 484, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/home/john/android/source/.repo/repo/subcmds/sync.py", line 200, in _FetchHelper
    clone_bundle=not opt.no_clone_bundle)
  File "/home/john/android/source/.repo/repo/project.py", line 934, in Sync_NetworkHalf
    and self._ApplyCloneBundle(initial=is_new, quiet=quiet):
  File "/home/john/android/source/.repo/repo/project.py", line 1475, in _ApplyCloneBundle
    exist_dst = self._FetchBundle(bundle_url, bundle_tmp, bundle_dst, quiet)
  File "/home/john/android/source/.repo/repo/project.py", line 1511, in _FetchBundle
    r = urllib2.urlopen(req)
  File "/usr/lib/python2.6/urllib2.py", line 126, in urlopen
    return _opener.open(url, data, timeout)
  File "/usr/lib/python2.6/urllib2.py", line 397, in open
    response = meth(req, response)
  File "/usr/lib/python2.6/urllib2.py", line 510, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/lib/python2.6/urllib2.py", line 429, in error
    result = self._call_chain(*args)
  File "/usr/lib/python2.6/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/usr/lib/python2.6/urllib2.py", line 605, in http_error_302
    return self.parent.open(new, timeout=req.timeout)
  File "/usr/lib/python2.6/urllib2.py", line 391, in open
    response = self._open(req, data)
  File "/usr/lib/python2.6/urllib2.py", line 409, in _open
    '_open', req)
  File "/usr/lib/python2.6/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/usr/lib/python2.6/urllib2.py", line 1161, in http_open
    return self.do_open(httplib.HTTPConnection, req)
  File "/usr/lib/python2.6/urllib2.py", line 1134, in do_open
    r = h.getresponse()
  File "/usr/lib/python2.6/httplib.py", line 986, in getresponse
    response.begin()
  File "/usr/lib/python2.6/httplib.py", line 391, in begin
    version, status, reason = self._read_status()
  File "/usr/lib/python2.6/httplib.py", line 355, in _read_status
    raise BadStatusLine(line)
BadStatusLine
 Then:
Exception in thread Thread-28:
Traceback (most recent call last):
  File "/usr/lib/python2.6/threading.py", line 532, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.6/threading.py", line 484, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/home/john/android/source/.repo/repo/subcmds/sync.py", line 200, in _FetchHelper
    clone_bundle=not opt.no_clone_bundle)
  File "/home/john/android/source/.repo/repo/project.py", line 934, in Sync_NetworkHalf
    and self._ApplyCloneBundle(initial=is_new, quiet=quiet):
  File "/home/john/android/source/.repo/repo/project.py", line 1475, in _ApplyCloneBundle
    exist_dst = self._FetchBundle(bundle_url, bundle_tmp, bundle_dst, quiet)
  File "/home/john/android/source/.repo/repo/project.py", line 1539, in _FetchBundle
    raise DownloadError('%s: %s ' % (req.get_host(), str(e)))
DownloadError: android.googlesource.com: <urlopen error [Errno 110] Connection timed out> 

Then:
Exception in thread Thread-28:
Traceback (most recent call last):
  File "/usr/lib/python2.6/threading.py", line 532, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.6/threading.py", line 484, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/home/john/android/source/.repo/repo/subcmds/sync.py", line 200, in _FetchHelper
    clone_bundle=not opt.no_clone_bundle)
  File "/home/john/android/source/.repo/repo/project.py", line 934, in Sync_NetworkHalf
    and self._ApplyCloneBundle(initial=is_new, quiet=quiet):
  File "/home/john/android/source/.repo/repo/project.py", line 1475, in _ApplyCloneBundle
    exist_dst = self._FetchBundle(bundle_url, bundle_tmp, bundle_dst, quiet)
  File "/home/john/android/source/.repo/repo/project.py", line 1539, in _FetchBundle
    raise DownloadError('%s: %s ' % (req.get_host(), str(e)))
DownloadError: android.googlesource.com: <urlopen error [Errno 110] Connection timed out> 

--

Magnus Bäck

unread,
Mar 26, 2012, 3:35:16 PM3/26/12
to android-...@googlegroups.com
On Monday, March 26, 2012 at 14:18 EDT,
John Kirk <jkir...@gmail.com> wrote:

> I made sure I have most recent version of repo and I also have python
> 2.7.2+. I believe this to be a local issue because I also fail to fetch
> from github. Of all the repo operations I have tried, about 30, only one
> has succeeded.

Any firewall or proxy in the way? Repo should be happy fetching through
a proxy, but you need to set up http_proxy correctly.

--
Magnus B�ck
ba...@google.com

John Kirk

unread,
Mar 26, 2012, 6:05:49 PM3/26/12
to android-...@googlegroups.com

Thanks for the input but I do not use a proxy. I have a network switch and wireless router. I have done sync successfully in the past and that leads me to my confusion. It worked, then did not work.

Magnus Bäck
ba...@google.com

John Kirk

unread,
Jun 13, 2012, 11:45:29 AM6/13/12
to android-...@googlegroups.com
I got it. Using [code]repo sync[code/] after each failure resulted in a complete sync. I was able to build master even with repeated sync failures. "Repo" does a good job at ensuring a complete sync and I was surprised that my local was complete after so much trouble.


John Kirk
636 South John Paul Street 
El Paso Texas, 79938
Cell 915-799-1553 (NEW AGAIN!!!)




On Tue, Jun 12, 2012 at 7:42 PM, Nate H <hnm...@gmail.com> wrote:
This isnt a proxy issue.
Here is the guide by Google

Using authentication

By default, access to the Android source code is anonymous. To protect the servers against excessive usage, each IP address is associated with a quota.

When sharing an IP address with other users (e.g. when accessing the source repositories from beyond a NAT firewall), the quotas can trigger even for regular usage patterns (e.g. if many users sync new clients from the same IP address within a short period).

In that case, it is possible to use authenticated access, which then uses a separate quota for each user, regardless of the IP address.

The first step is to create a password from the password generator and to save it in ~/.netrc according to the instructions on that page.

The second step is to force authenticated access, by using the following manifest URI: https://android.googlesource.com/a/platform/manifest. Notice how the /a/ directory prefix triggers mandatory authentication. You can convert an existing client to use mandatory authentication with the following command:







在 2012年3月27日星期二UTC+8上午6时05分49秒,John Kirk写道:

Thanks for the input but I do not use a proxy. I have a network switch and wireless router. I have done sync successfully in the past and that leads me to my confusion. It worked, then did not work.

On Mar 26, 2012 1:35 PM, "Magnus Bäck" <ba...@google.com> wrote:
On Monday, March 26, 2012 at 14:18 EDT,
    John Kirk <jkir...@gmail.com> wrote:

> I made sure I have most recent version of repo and I also have python
> 2.7.2+. I believe this to be a local issue because I also fail to fetch
> from github. Of all the repo operations I have tried, about 30, only one
> has succeeded.

Any firewall or proxy in the way? Repo should be happy fetching through
a proxy, but you need to set up http_proxy correctly.

--
Magnus Bäck
ba...@google.com

--
You received this message because you are subscribed to the "Android Building" mailing list.
To post to this group, send email to android-building@googlegroups.com

To unsubscribe from this group, send email to

For more options, visit this group at
http://groups.google.com/group/android-building?hl=en
Reply all
Reply to author
Forward
0 new messages