[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mercurial
Subject:    Re: "TypeError: Odd-length string" error during clone
From:       Matt Mackall <mpm () selenic ! com>
Date:       2015-03-24 14:18:36
Message-ID: 1427206716.488.3.camel () selenic ! com
[Download RAW message or body]

On Tue, 2015-03-24 at 19:36 +0800, Arnel Legaspi wrote:
> On 3/24/2015 2:31 AM, Matt Mackall wrote:
> > On Mon, 2015-03-23 at 18:29 +0800, Arnel Legaspi wrote:
> >> On 3/23/2015 1:00 AM, mercurial-request@selenic.com wrote:
> >>> On Sat, 2015-03-21 at 07:21 +0800, Arnel Legaspi wrote:
> >>>>> Hello,
> >>>>>
> >>>>> I got the following error after pulling changes from
> >>>>> http://selenic.com/hg  (I'm on Windows 8.1 with Mercurial v3.3.2):
> >>>>>
> >>>>> $ hg pull -u --debug -v > "../err.txt"
> >>>>> warning: failed to set color mode to win32
> >>>>> transaction abort!
> >>>>> rollback completed
> >>>>> ** unknown exception encountered, please report by visiting
> >>>>> **http://mercurial.selenic.com/wiki/BugTracker
> >>>>> ** Python 2.7.9 (default, Dec 10 2014, 12:28:03) [MSC v.1500 64 bit (AMD64)]
> >>>>> ** Mercurial Distributed SCM (version 3.3.2)
> >>>>> ** Extensions loaded: progress, purge, color, record, histedit, strip,
> >>>>> shelve, rebase, convert
> >>>>> Traceback (most recent call last):
> >>>>>     File "hg", line 43, in <module>
> >>>>>       mercurial.dispatch.run()
> >>>>>     File "mercurial\dispatch.pyc", line 28, in run
> >>>>>     File "mercurial\dispatch.pyc", line 71, in dispatch
> >>>>>     File "mercurial\dispatch.pyc", line 140, in _runcatch
> >>>>>     File "mercurial\dispatch.pyc", line 863, in _dispatch
> >>>>>     File "mercurial\dispatch.pyc", line 624, in runcommand
> >>>>>     File "mercurial\extensions.pyc", line 194, in wrap
> >>>>>     File "hgext\color.pyc", line 491, in colorcmd
> >>>>>     File "mercurial\dispatch.pyc", line 954, in _runcommand
> >>>>>     File "mercurial\dispatch.pyc", line 925, in checkargs
> >>>>>     File "mercurial\dispatch.pyc", line 860, in <lambda>
> >>>>>     File "mercurial\util.pyc", line 711, in check
> >>>>>     File "mercurial\extensions.pyc", line 149, in wrap
> >>>>>     File "mercurial\util.pyc", line 711, in check
> >>>>>     File "hgext\rebase.pyc", line 1048, in pullrebase
> >>>>>     File "mercurial\util.pyc", line 711, in check
> >>>>>     File "mercurial\commands.pyc", line 5013, in pull
> >>>>>     File "mercurial\exchange.pyc", line 883, in pull
> >>>>>     File "mercurial\exchange.pyc", line 1053, in _pullphase
> >>>>>     File "mercurial\exchange.pyc", line 1065, in _pullapplyphases
> >>>>>     File "mercurial\phases.pyc", line 400, in analyzeremotephases
> >>>>> TypeError: Odd-length string
> >>> This error happens when our hex-to-binary converter receives a hex
> >>> string that's not exactly 40 bytes... which should never happen.
> >>>
> >>> I think something's interfering with your connection. Or it might have
> >>> to do with the fact that yet another web spider is trying to crawl all
> >>> the hgweb archive links. If it persists, please try wireshark.
> >>
> >> Thanks, Matt. I tried cloning the Mercurial repo at work, and it did
> >> work as expected.
> >>
> >> However, I'm not sure what to look for in Wireshark (at least nothing
> >> appears out of the ordinary), so as a work-around, I'll just bundle up
> >> the changesets on my work machine clone and use that to sync the repo on
> >> my home machine.
> >
> > - start wireshark
> > - capture traffic
> > - run a clone that fails
> > - stop capture
> > - find the http stream
> > - analyze->follow tcp stream
> > - show us what happens at the very end of the stream
> >
> 
> Hi Matt,
> 
> Here's what I got.
> 
> """
> GET /hg?cmd=listkeys HTTP/1.1
> Accept-Encoding: identity
> x-hgarg-1: namespace=phases
> host: selenic.com
> vary: X-HgArg-1
> accept: application/mercurial-0.1
> user-agent: mercurial/proto-1.0
> 
> HTTP/1.1 200 OK
> Content-Length: 42
> Content-Type: application/mercurial-0.1
> Server: Apache/2.2.16 (Debian)
> Last-Modified: Tue, 24 Mar 2015 10:47:45 GMT
> Connection: keep-alive
> Date: Tue, 24 Mar 2015 10:51:08 GMT
> 
> @.811a1842cfe5f632145912d9bf2dc859e6ee3eeb
> """

You have a broken transparent caching proxy in your network that is
ignoring the "vary" parameter above that tells such proxies not to cache
results when the X-Hg-Arg-1 changes. Here, we're returning the result
for an earlier request with namespace=bookmarks.

-- 
Mathematics is the supreme nostalgia of our time.


_______________________________________________
Mercurial mailing list
Mercurial@selenic.com
http://selenic.com/mailman/listinfo/mercurial

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic