Debugging help requested: TypeError

Marcus mh-mercurial at online.de
Fri Jul 26 21:02:46 UTC 2019


On 21/07/2019 16.33, Marcus wrote:
> Running current hg under Python3, I am getting a TypeError during ``hg 
> shelve -i`` (see below). Oddly, the error disappears when I run ``hg`` 
> from its source tree, rather than the installed location. The error 
> seems to be Python3 specific.
> 
>    $ hg shelve -i
>    starting interactive selection
>    ** unknown exception encountered, please report by visiting
>    ** https://mercurial-scm.org/wiki/BugTracker
>    ** Python 3.6.8 (default, Jan 14 2019, 11:02:34) [GCC 8.0.1 20180414 
> (experimental) [trunk revision 259383]]
>    ** Mercurial Distributed SCM (version 5.0.2+434-9eace8d6d537)
>    ** Extensions loaded: absorb, show, histedit, rebase, strip, extdiff
>    [...]
>      File "/usr/local/lib/python3.6/dist-packages/mercurial/crecord.py", 
> line 1900, in _main
>      self.updatescreen()
>      File "/usr/local/lib/python3.6/dist-packages/mercurial/crecord.py", 
> line 1167, in updatescreen
>        self.xscreensize)
>    TypeError: integer argument expected, got float

Had some time to debug this a bit. When randomly navigating the 
selection, at some point the first argument to 
``self.chunkpad.refresh()``,  ``self.firstlineofpadtoprint``, suddenly 
flips to a non-integer value (41.63333333333338 in my case).

Tracing this a bit further, several contributors such as e.g. 
``self.selecteditemstartline`` are non-integer most of the time even 
before the error pops up. Is there an implicit conversion to int which 
somehow fails to apply under some circumstances?

BTW, the behaviour is the same for 5.1rc0.

Thanks,
Marcus



More information about the Mercurial mailing list