TypeError: 'list' object is not callable on tags.py
Matt Mackall
mpm at selenic.com
Sun Aug 24 14:22:51 CDT 2014
On Sun, 2014-08-24 at 10:19 +0200, Patrick PIERRE wrote:
> Hi!
>
> I am a developer for PubliForge (http://doc.publiforge.org) and we use
> the Mercurial API.
Hopefully you've read that there is no such thing:
http://mercurial.selenic.com/wiki/MercurialApi
> With the 3.1 version, sometimes we have the following error when we ask
> for a log command:
>
> File
> "/home/patrick/bin/virtualenv/local/lib/python2.7/site-packages/mercurial-3.1-py2.7-linux-x86_64.egg/mercurial/commands.py",
> line 4187, in log
> displayer.show(ctx, copies=copies, matchfn=revmatchfn)
> File
> "/home/patrick/bin/virtualenv/local/lib/python2.7/site-packages/mercurial-3.1-py2.7-linux-x86_64.egg/mercurial/cmdutil.py",
> line 836, in show
> self._show(ctx, copies, matchfn, props)
> File
> "/home/patrick/bin/virtualenv/local/lib/python2.7/site-packages/mercurial-3.1-py2.7-linux-x86_64.egg/mercurial/cmdutil.py",
> line 873, in _show
> for tag in self.repo.nodetags(changenode):
> File
> "/home/patrick/bin/virtualenv/local/lib/python2.7/site-packages/mercurial-3.1-py2.7-linux-x86_64.egg/mercurial/localrepo.py",
> line 685, in nodetags
> if not self._tagscache.nodetagscache:
> File
> "/home/patrick/bin/virtualenv/local/lib/python2.7/site-packages/mercurial-3.1-py2.7-linux-x86_64.egg/mercurial/util.py",
> line 319, in __get__
> result = self.func(obj)
> File
> "/home/patrick/bin/virtualenv/local/lib/python2.7/site-packages/mercurial-3.1-py2.7-linux-x86_64.egg/mercurial/localrepo.py",
> line 608, in _tagscache
> cache.tags, cache.tagtypes = self._findtags()
> File
> "/home/patrick/bin/virtualenv/local/lib/python2.7/site-packages/mercurial-3.1-py2.7-linux-x86_64.egg/mercurial/localrepo.py",
> line 645, in _findtags
> tagsmod.findglobaltags(self.ui, self, alltags, tagtypes)
> File
> "/home/patrick/bin/virtualenv/local/lib/python2.7/site-packages/mercurial-3.1-py2.7-linux-x86_64.egg/mercurial/tags.py",
> line 60, in findglobaltags
> _writetagcache(ui, repo, heads, tagfnode, alltags)
> File
> "/home/patrick/bin/virtualenv/local/lib/python2.7/site-packages/mercurial-3.1-py2.7-linux-x86_64.egg/mercurial/tags.py",
> line 311, in _writetagcache
> len(heads), len(cachetags))
> TypeError: 'list' object is not callable
>
> Do you have any idea about the source of the trouble?
That's an utterly nonsensical error that doesn't match the reported
line. That suggests you're running a different version of code than
what's on disk: did you forget to restart your webserver?
Alternately, you've somehow replaced the built-in len function with a
list object. This is not recommended.
(In any case, if you're using Mercurial as a library, you're in
unsupported territory.)
--
Mathematics is the supreme nostalgia of our time.
More information about the Mercurial-devel
mailing list