On Tue, Aug 11, 2009 at 4:37 PM, John Floren <slawmas...@gmail.com> wrote:
> Hi
>
> So I'm trying to clone a private repository I just created on
> bitbucket. This is what I see:
>
> jerq% hg clone https://<username>@bitbucket.org/<username>/<repo>/
> destination directory: <repo>
> http authorization required
> realm: Bitbucket.org HTTP
> user: <username>
> abort: could not import module msvcrt!

I just hit this problem again with a clean install of the mercurial
and python from sources (and my package tool .. but I don't think it's
the problem).

ratrace helped.

115 hg Open 0x228045 0fffc1d7/"/sys/lib/python/getpass.py" 00000000 =
7 "" 0x11afa42962dc41a0 0x11afa42962dfdf68
115 hg Fstat 0x229874 00000007 00742ed4 00000071 = 66 ""
0x11afa429635fb9e0 0x11afa429636b75c8
115 hg Open 0x228045 0fffbd73/"/sys/lib/python/getpass.pyc" 00000000 =
8 "" 0x11afa42963e38040 0x11afa42963f16ea8
115 hg Pread 0x22b14c 8
00fcbb48/".......kc............@...s....d..z..d..d..k..z..d..d..g..z..d..d"
4096 -0x1 = 3320 "" 0x11afa429648f9ad8 0x11afa429649bf6e8
115 hg Fstat 0x229874 00000008 00742ed4 00000071 = 67 ""
0x11afa429651731c8 0x11afa429651977d0
115 hg Pread 0x22b14c 8 00fcbb48/"" 4096 -0x1 = 0 ""
0x11afa429659a2538 0x11afa429659c6370
115 hg Close 0x22aa13 8 = 0 "" 0x11afa429666099e8 0x11afa42966623be0
115 hg Brk 0x22acd6 011e7600 00394918 0022826c = 0 ""
0x11afa42967031790 0x11afa42967037550
115 hg Open 0x2288bc 00262904/"#c/pid" 00000000 = 8 ""
0x11afa42967899928 0x11afa429678a8770
115 hg Pread 0x22b14c 8 0fffb4b9/"........115." 15 -0x1 = 12 ""
0x11afa42968056c60 0x11afa4296805e960
115 hg Close 0x2288f3 8 = 0 "" 0x11afa42968827818 0x11afa4296882be68
115 hg Stat 0x229730 0fffac7b 00742ed4/"��;" 00000073 = -1
"'/bin/termios' file does not exist" 0x11afa42968dfe610
0x11afa42968ef6ab8
115 hg Errstr 0x22bd6f 0x36b19c/"" 128 = 0 "" 0x11afa42969625c80
0x11afa4296962d980
115 hg Errstr 0x22bdc4 0x36b19c/"" 128 = 0 "" 0x11afa42969debc58
0x11afa42969df3d40
115 hg Open 0x228045 0fffac7b/"/bin/termios.py" 00000000 = -1
"'/bin/termios.py' file does not exist" 0x11afa4296a5ba100
0x11afa4296a6c2390
115 hg Errstr 0x22bd6f 0x36b19c/"" 128 = 0 "" 0x11afa4296ae0d2a8
0x11afa4296ae15390
115 hg Errstr 0x22bdc4 0x36b19c/"" 128 = 0 "" 0x11afa4296b5d3a50
0x11afa4296b5dbb38
115 hg Open 0x228045 0fffac7b/"/bin/termios.pyc" 00000000 = -1
"'/bin/termios.pyc' file does not exist" 0x11afa4296bda55a8
0x11afa4296bea0160
115 hg Errstr 0x22bd6f 0x36b19c/"" 128 = 0 "" 0x11afa4296c3352e8
0x11afa4296c340a80
115 hg Errstr 0x22bdc4 0x36b19c/"" 128 = 0 "" 0x11afa4296cb1a6c0
0x11afa4296cb25688
115 hg Stat 0x229730 0fffac7b 00742ed4/"��;" 00000073 = -1
"'/sys/lib/python/termios' does not exist" 0x11afa4296d3a4368
0x11afa4296d3d5490
115 hg Errstr 0x22bd6f 0x36b19c/"" 128 = 0 "" 0x11afa4296de091a0
0x11afa4296de11288
115 hg Errstr 0x22bdc4 0x36b19c/"" 128 = 0 "" 0x11afa4296e5c2e28
0x11afa4296e5caf10
115 hg Open 0x228045 0fffac7b/"/sys/lib/python/termios.py" 00000000 =
-1 "'/sys/lib/python/termios.py' does not exist" 0x11afa4296ed872a8
0x11afa4296ee4f9b0
115 hg Errstr 0x22bd6f 0x36b19c/"" 128 = 0 "" 0x11afa4296f708458
0x11afa4296f710928
115 hg Errstr 0x22bdc4 0x36b19c/"" 128 = 0 "" 0x11afa4296ff17428
0x11afa4296ff1f510
115 hg Open 0x228045 0fffac7b/"/sys/lib/python/termios.pyc" 00000000 =
-1 "'/sys/lib/python/termios.pyc' does not exist" 0x11afa429706e1e38
0x11afa4297070a2c0
115 hg Errstr 0x22bd6f 0x36b19c/"" 128 = 0 "" 0x11afa42970f163b0
0x11afa42970f22ed0
115 hg Errstr 0x22bdc4 0x36b19c/"" 128 = 0 "" 0x11afa429716e57f8
0x11afa429716f07c0
115 hg Stat 0x229730 0fffac7b 00742ed4/"��;" 00000073 = -1
"'/sys/lib/python/lib/python2.5/site-packages/termios' does not exist"
0x11afa42971ed6750 0x11afa429721c04e8
115 hg Errstr 0x22bd6f 0x36b19c/"" 128 = 0 "" 0x11afa429729d4aa8
0x11afa429729dcb90
115 hg Errstr 0x22bdc4 0x36b19c/"" 128 = 0 "" 0x11afa429732579f0
0x11afa4297325f6f0
115 hg Open 0x228045
0fffac7b/"/sys/lib/python/lib/python2.5/site-packages/termios.py"
00000000 = -1 "'/sys/lib/python/lib/python2.5/site-packages/termios.py'
does not exist" 0x11afa42973a3a2d0 0x11afa42973d53638
115 hg Errstr 0x22bd6f 0x36b19c/"" 128 = 0 "" 0x11afa429742a3fc0
0x11afa429742afb40
115 hg Errstr 0x22bdc4 0x36b19c/"" 128 = 0 "" 0x11afa42974a75b18
0x11afa42974a80ec8
115 hg Open 0x228045
0fffac7b/"/sys/lib/python/lib/python2.5/site-packages/termios.pyc"
00000000 = -1 "'/sys/lib/python/lib/python2.5/site-packages/termios.pyc'
does not exist" 0x11afa4297523f588 0x11afa42975328800
115 hg Errstr 0x22bd6f 0x36b19c/"" 128 = 0 "" 0x11afa42975cd2608
0x11afa42975cda6f0
115 hg Errstr 0x22bdc4 0x36b19c/"" 128 = 0 "" 0x11afa4297648b6d8
0x11afa429764933d8
115 hg Open 0x2288bc 00262904/"#c/pid" 00000000 = 8 ""
0x11afa42976a50b90 0x11afa42976a63858
115 hg Pread 0x22b14c 8 0fffb4c1/"........115." 15 -0x1 = 12 ""
0x11afa42977216780 0x11afa429772207a8
115 hg Close 0x2288f3 8 = 0 "" 0x11afa429779d4670 0x11afa429779dafe8
115 hg Close 0x22aa13 7 = 0 "" 0x11afa42978cdcf60 0x11afa42978d8fac0
115 hg Open 0x2288bc 00262904/"#c/pid" 00000000 = 7 ""
0x11afa4297929f920 0x11afa429792abc70
115 hg Pread 0x22b14c 7 0fffca1d/"........115." 15 -0x1 = 12 ""
0x11afa42979a1dc88 0x11afa42979a25988
115 hg Close 0x2288f3 7 = 0 "" 0x11afa4297a1e9638 0x11afa4297a1ee840
115 hg Open 0x2288bc 00262904/"#c/pid" 00000000 = 7 ""
0x11afa4297aa01690 0x11afa4297aa12be8
115 hg Pread 0x22b14c 7 0fffc855/"........115." 15 -0x1 = 12 ""
0x11afa4297b823160 0x11afa4297b82aa78
115 hg Close 0x2288f3 7 = 0 "" 0x11afa4297bfb64b8 0x11afa4297bfbab08
115 hg Open 0x2288bc 00262904/"#c/pid" 00000000 = 7 ""
0x11afa4297c55c188 0x11afa4297c56ea68
115 hg Pread 0x22b14c 7 0fffc85d/"........115." 15 -0x1 = 12 ""
0x11afa4297cd292a8 0x11afa4297cd33e88
115 hg Close 0x2288f3 7 = 0 "" 0x11afa4297d4c3b30 0x11afa4297d4c75c8
115 hg Open 0x2288bc 00262904/"#c/pid" 00000000 = 7 ""
0x11afa4297dbbecf0 0x11afa4297dbcb040
115 hg Pread 0x22b14c 7 0fffccbd/"........115." 15 -0x1 = 12 ""
0x11afa4297e3700c0 0x11afa4297e377dc0
115 hg Close 0x2288f3 7 = 0 "" 0x11afa4297eb698d0 0x11afa4297eb6d750
115 hg Stat 0x229730 0fffc47f 00742ed4/"��;" 00000073 = -1
"'/bin/msvcrt' file does not exist" 0x11afa4297f181da8
0x11afa4297f4f1010


Ow, that hurt, did it not?

Basically, it found getpass, did not find termios, then went looking
for some MS VC runtime. Yuck.

The code (getpass.py):
# Bind the name getpass to the appropriate function
try:
    import termios
    # it's possible there is an incompatible termios from the
    # McMillan Installer, make sure we have a UNIX-compatible termios
    termios.tcgetattr, termios.tcsetattr
except (ImportError, AttributeError):
    try:
        import msvcrt
    except ImportError:
        try:
            from EasyDialogs import AskPassword
        except ImportError:
            getpass = default_getpass
        else:
            getpass = AskPassword
    else:
        getpass = win_getpass
else:
    getpass = unix_getpass

Wow, that hurt too.

So, it's trying to get a password, as it is an https import, so it
pulls in getpass, which pulls in termios, and it's failing, and the
only reasonable thing to do when you can't find a unix package is to
try to use an MS VC runtime package and, when that fails, bail out
with one of the worst error messages one can imagine.

Wow, GRRoss.

Anyway, that is why you get that utterly useless error message:
because you're not unix. It just tells you that the error is that you
are not windows. Clear?

ron

Reply via email to