OSGeo / grass-addons

GRASS GIS Addons Repository
https://grass.osgeo.org/grass-stable/manuals/addons/
GNU General Public License v2.0
103 stars 154 forks source link

[Bug] v.stream.profiler: lazy import of matplotlib needed for addon manual #457

Closed neteler closed 2 years ago

neteler commented 3 years ago

Name of the addon v.stream.profiler

Describe the bug

The addon compilation shows an error:

Traceback (most recent call last):
  File "/home/neteler/.grass7/addons/scripts/v.stream.profiler", line 377, in <module>
    main()
  File "/home/neteler/.grass7/addons/scripts/v.stream.profiler", line 160, in main
    matplotlib.use('wxAGG')  # required by windows
  File "/home/neteler/.local/lib/python3.7/site-packages/matplotlib/cbook/deprecation.py", line 296, in wrapper
    return func(*args, **kwargs)
  File "/home/neteler/.local/lib/python3.7/site-packages/matplotlib/cbook/deprecation.py", line 358, in wrapper
    return func(*args, **kwargs)
  File "/home/neteler/.local/lib/python3.7/site-packages/matplotlib/__init__.py", line 1281, in use
    plt.switch_backend(name)
  File "/home/neteler/.local/lib/python3.7/site-packages/matplotlib/pyplot.py", line 237, in switch_backend
    newbackend, required_framework, current_framework))
ImportError: Cannot load backend 'WXAgg' which requires the 'wx' interactive framework, as 'headless' is currently running
make: *** [/home/neteler/src/releasebranch_7_8/dist.x86_64-pc-linux-gnu//include/Make/Html.make:14: v.stream.profiler.tmp.html] Error 1
rm v.stream.profiler.tmp.html

Error log: https://grass.osgeo.org/addons/grass7/logs/v.stream.profiler.log

While the man page is there: https://grass.osgeo.org/grass7/manuals/addons/v.stream.profiler.html it is from November 27, 2020 (last successful run, apparently).

neteler commented 2 years ago

Fixed in #732