Error when removing rows
Closed this issue · 2 comments
smathot commented
I regularly receive automated bug reports ("Oops, I did it again") of the kind below. It's apparently triggered when a row in the OpenSesame loop table is right-clicked and removed, causing python-datamatrix
to choke; however, I haven't been able to reproduce this issue myself, even though, by the number of bug reports, it's a fairly common problem.
Therefore, @dschreij, @eort, and @Klemtonius, have you ever come across this issue, and do you know a reproducible way to trigger it?
Traceback (most recent call last):
File "c:\program files (x86)\opensesame\lib\site-packages\python_qdatamatrix-0.1.7-py2.7.egg\qdatamatrix\_qcontextmenu.py", line 89, in activate
self.spreadsheet._remove_rows()
File "c:\program files (x86)\opensesame\lib\site-packages\python_qdatamatrix-0.1.7-py2.7.egg\qdatamatrix\decorators.py", line 65, in inner
retval = fnc(self, *args, **kwdict)
File "c:\program files (x86)\opensesame\lib\site-packages\python_qdatamatrix-0.1.7-py2.7.egg\qdatamatrix\_qspreadsheet.py", line 204, in _remove_rows
del self.dm[row]
File "c:\program files (x86)\opensesame\lib\site-packages\python_datamatrix-0.3.0-py2.7.egg\datamatrix\_datamatrix\_datamatrix.py", line 493, in __delitem__
_slice = self[value] ^ self
File "c:\program files (x86)\opensesame\lib\site-packages\python_datamatrix-0.3.0-py2.7.egg\datamatrix\_datamatrix\_datamatrix.py", line 434, in __xor__
return self._merge(other, sorted(selection))
File "c:\program files (x86)\opensesame\lib\site-packages\python_datamatrix-0.3.0-py2.7.egg\datamatrix\_datamatrix\_datamatrix.py", line 274, in _merge
dm._cols[name] = self._cols[name]._merge(other._cols[name], _rowid)
File "c:\program files (x86)\opensesame\lib\site-packages\python_datamatrix-0.3.0-py2.7.egg\datamatrix\_datamatrix\_basecolumn.py", line 307, in _merge
col._seq.append(other._seq[other._rowid.index(row)])
IndexError: list index out of range
eort commented
Nope, it's the first time I see this error, but I also haven't deleted rows too often.
dschreij commented
I thought this might something with qt5 on OsX but the stack trace shows
windows paths so I have no idea