Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
eflister opened this issue Jun 3, 2015 · 2 comments
Open

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

eflister opened this issue Jun 3, 2015 · 2 comments

Comments

@eflister
Copy link

eflister commented Jun 3, 2015

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
Copy link
Member

jzaremba commented Jun 3, 2015

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.

@jzaremba jzaremba closed this as completed Jun 3, 2015
@pkaifosh
Copy link
Member

pkaifosh commented Jun 3, 2015

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).

@pkaifosh pkaifosh reopened this Jun 3, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants