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

The gmtplot directive no longer works for PyGMT output #55

Open
seisman opened this issue May 1, 2022 · 0 comments
Open

The gmtplot directive no longer works for PyGMT output #55

seisman opened this issue May 1, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@seisman
Copy link
Member

seisman commented May 1, 2022

Full code that generated the error

.. gmtplot::
    :language: python

    import pygmt
	  
	fig = pygmt.Figure()
	fig.coast(projection="G10/52/12c", region="g", frame="g", land="gray")
	fig.show()

Full error message

Exception occurred:
  File "/Users/seisman/OSS/gmt/sphinx_gmt/sphinx_gmt/gmtplot.py", line 262, in eval_python
    catch_display.output.data
AttributeError: 'NoneType' object has no attribute 'data'

The exceptions are most likely due to the redesign of the PyGMT's Figure.show() method in GenericMappingTools/pygmt#529. The main differences between the old and new Figure.show() method is that, the new Figure.show() method no longer returns the image.

@seisman seisman added the bug Something isn't working label May 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant