losonczylab / sima

Python package for analysis of dynamic fluorescence microscopy data
GNU General Public License v2.0
100 stars 50 forks source link

in workflow.py: show() got an unexpected keyword argument 'block' #182

Open eflister opened 9 years ago

eflister commented 9 years ago
File "C:/Users/nlab/Desktop/sima/examples/workflow.py", line 144, in
 <module>
     show(block=True)

   File
 "C:\Users\nlab\Downloads\WinPython-64bit-2.7.9.5\python-2.7.9.amd64\lib\site-packages\matplotlib\pyplot.py",
 line 155, in show
     return _show(*args, **kw)

 TypeError: show() got an unexpected keyword argument 'block'

removing (block=True) allows it to complete without error

jzaremba commented 9 years ago

Not all matplotlib backends support block=True (such as Spyder's iPython console). The script should work fine when run with the python interpreter (python workflow.py), or as you said, you can remove the line.

pkaifosh commented 9 years ago

OK. It looks like the block keyword argument is actually experimental, and so may not be supported in all version of matplotlib: http://matplotlib.org/api/pyplot_api.html#matplotlib.pyplot.show We can use pyplot.ion instead (http://matplotlib.org/api/pyplot_api.html#matplotlib.pyplot.ion).