GenericMappingTools / GenericMappingTools/sphinx_gmt

The gmtplot directive no longer works for PyGMT output

Open
#55 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Python
Stars
7
Forks
1
PR merge metrics
No merged PRs in 30d

Description

**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 https://github.com/GenericMappingTools/pygmt/pull/529. The main differences between the old and new `Figure.show()` method is that, the new `Figure.show()` method no longer returns the image.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.