TypeError: '<' not supported between instances of 'int' and 'NoneType'
Created originally on Bitbucket by nekopep (Laurent Dufréchou)
Here a bug I get on a fresh install on arch manjaro , python 3.8 on a each startup.
Still the ui is usable.
I added:
print(self.nodes[-1].rev)
print(type(self.nodes[-1].rev))
print(self.nodes[-1])
print(type(self.nodes[-1]))
<class 'NoneType'>
<tortoisehg.hgqt.graph.GraphNode object at 0x7f76744af270>
<class 'tortoisehg.hgqt.graph.GraphNode'>
no username found, using 'laurent@sparkle' instead
FYI the code has not changed on current code, so bug can still be there.
#!python
** Mercurial version (5.2.1). TortoiseHg version (5.1+200-fb9035853199)
** Command:
** CWD: /home/laurent/Documents/projects/python/odoo/other/odoo_13_src
** Encoding: UTF-8
** Extensions loaded: tortoisehg.util.configitems
** Python version: 3.8.1 (default, Jan 8 2020, 23:09:20) [GCC 9.2.0]
** System: Linux sparkle 5.3.18-1-MANJARO #1 SMP PREEMPT Wed Dec 18 18:34:35 UTC 2019 x86_64
** Qt-5.14.0 PyQt-5.14.1 QScintilla-2.11.4
Traceback (most recent call last):
File "/usr/lib/python3.8/site-packages/tortoisehg/hgqt/repowidget.py", line 268, in _initView
self._updateRepoViewForModel()
File "/usr/lib/python3.8/site-packages/tortoisehg/hgqt/repowidget.py", line 866, in _updateRepoViewForModel
index = model.defaultIndex()
File "/usr/lib/python3.8/site-packages/tortoisehg/hgqt/repomodel.py", line 677, in defaultIndex
index = self.indexFromRev(rev)
File "/usr/lib/python3.8/site-packages/tortoisehg/hgqt/repomodel.py", line 697, in indexFromRev
row = self.graph.index(rev)
File "/usr/lib/python3.8/site-packages/tortoisehg/hgqt/graph.py", line 986, in index
if isinstance(rev, int) and len(self) > 0 and rev < self.nodes[-1].rev:
TypeError: '<' not supported between instances of 'int' and 'NoneType'