What steps will reproduce the problem?
What is the expected output? What do you see instead?
i want a sorted dict,but change nothing,then raise this error
Please provide any additional information below
File "/home/shanjie/miniconda3/lib/python3.6/site-packages/spyder/widgets/variableexplorer/collectionseditor.py", line 250, in fetchMore
self.rows_loaded + items_to_fetch)
File "/home/shanjie/miniconda3/lib/python3.6/site-packages/spyder/widgets/variableexplorer/collectionseditor.py", line 179, in set_size_and_type
for index in range(start, stop) ]
File "/home/shanjie/miniconda3/lib/python3.6/site-packages/spyder/widgets/variableexplorer/collectionseditor.py", line 179, in
for index in range(start, stop) ]
IndexError: list index out of range
pyflakes >=0.6.0 : 1.5.0 (OK)
pycodestyle >=2.3: 2.3.1 (OK)
pygments >=2.0 : 2.2.0 (OK)
pandas >=0.13.1 : 0.20.3 (OK)
numpy >=1.7 : 1.13.1 (OK)
sphinx >=0.6.6 : 1.6.2 (OK)
rope >=0.9.4 : 0.9.4-1 (OK)
jedi >=0.9.0 : 0.10.2 (OK)
psutil >=0.3 : 5.2.2 (OK)
nbconvert >=4.0 : 5.2.1 (OK)
sympy >=0.7.3 : 1.1.1 (OK)
cython >=0.21 : 0.26 (OK)
qtconsole >=4.2.0: 4.3.0 (OK)
IPython >=4.0 : 6.1.0 (OK)
pylint >=0.25 : 1.6.4 (OK)
Thanks for reporting. We'll fix this in a future release.
@dalthviz, please take a look at this one.
I was able to reproduce this but only for collections that are more than 100 rows (which is the LARGE_NROWS
parameter used to fetch more data).
Steps to reproduce:
list
, dict
, etc.)Value
header to sort by values (or Type
or Size
but not Keys
/Index
)EDIT: actually bug occurs with Index
also but only after forcing the sorting on something else and then on Index
By calling sort on columns Sizes
, Values
or Types
, I think the self.keys
is getting shortened: instead of containing all keys, it now has the length of self.types
(or self.sizes
or self.values
) because of the call to sort_against
. Then calling fetchMore()
will fail to set_size_and_type
on fetched rows
Hi @Prikers, thanks for the info, then this issue will be fixed by your PR #5295 ?
Hi @dalthviz. I had investigated this case because indeed it was similar to #5295 so I wanted to let you know what I found.
As a side effect of the #5295 the error disappears when sorting by Value
but not for the other columns (Size
, etc.), sorry :disappointed:
@Prikers could you fix the error for the other columns in #5295?
Sure!
Most helpful comment
Sure!