spyder-ide / spyder

Official repository for Spyder - The Scientific Python Development Environment
https://www.spyder-ide.org
MIT License
8.39k stars 1.63k forks source link

Variable explorer cannot inspect a variable created by rasterio library #4996

Open Giangblackk opened 7 years ago

Giangblackk commented 7 years ago

Description

What steps will reproduce the problem?

  1. Open raster data: src1 = rasterio.open('image.tif')
  2. get ColorInterp: x = src1.colorinterp(1)
  3. Double click to x variable in variable explorer panel.

What is the expected output? What do you see instead?

Please provide any additional information below Type of x variable is None and value is <ColorInterp.red: 3>, not NoneType as when I create a new variable x = None File "/home/giangblackk/miniconda2/lib/python2.7/site-packages/spyder/widgets/variableexplorer/collectionseditor.py", line 519, in createEditor readonly=readonly) File "/home/giangblackk/miniconda2/lib/python2.7/site-packages/spyder/widgets/variableexplorer/collectionseditor.py", line 1311, in setup readonly=readonly, remote=remote) File "/home/giangblackk/miniconda2/lib/python2.7/site-packages/spyder/widgets/variableexplorer/collectionseditor.py", line 1266, in init title) File "/home/giangblackk/miniconda2/lib/python2.7/site-packages/spyder/widgets/variableexplorer/collectionseditor.py", line 1151, in init minmax=minmax) File "/home/giangblackk/miniconda2/lib/python2.7/site-packages/spyder/widgets/variableexplorer/collectionseditor.py", line 111, in init self.set_data(data) File "/home/giangblackk/miniconda2/lib/python2.7/site-packages/spyder/widgets/variableexplorer/collectionseditor.py", line 151, in set_data self.title += data_type TypeError: coercing to Unicode: need string or buffer, NoneType found

Version and main components

Dependencies

pyflakes >=0.5.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.1 (OK)
numpy >=1.7       :  1.11.3 (OK)
sphinx >=0.6.6    :  1.5.1 (OK)
rope >=0.9.4      :  0.9.4 (OK)
jedi >=0.9.0      :  0.9.0 (OK)
psutil >=0.3      :  5.1.3 (OK)
nbconvert >=4.0   :  5.1.1 (OK)
sympy >=0.7.3     :  None (NOK)
cython >=0.21     :  None (NOK)
qtconsole >=4.2.0 :  4.2.1 (OK)
IPython >=4.0;<6.0:  5.1.0 (OK)
pylint >=0.25     :  1.6.4 (OK)
ccordoba12 commented 7 years ago

Thanks for reporting. We're going to fix this in a future release.