Libtiff.info CLI : "ValueError: 'gtkagg' is not a valid value for backend" .
dennis-glx opened this issue · 1 comments
dennis-glx commented
Hi,
When trying to use the libtiff.info
script, I got the following error.
$ libtiff.info -i my_image.tiff --no-gui
Traceback (most recent call last):
File "/home/dj/.local/bin/libtiff.info", line 8, in <module>
sys.exit(main())
File "/home/dj/.local/lib/python3.8/site-packages/libtiff/scripts/info.py", line 77, in main
set_info_options(parser)
File "/home/dj/.local/lib/python3.8/site-packages/libtiff/script_options.py", line 95, in set_info_options
matplotlib.use('GTkAgg')
File "/home/dj/.local/lib/python3.8/site-packages/matplotlib/__init__.py", line 1154, in use
name = validate_backend(backend)
File "/home/dj/.local/lib/python3.8/site-packages/matplotlib/rcsetup.py", line 295, in validate_backend
else _validate_standard_backends(s))
File "/home/dj/.local/lib/python3.8/site-packages/matplotlib/rcsetup.py", line 81, in __call__
raise ValueError(msg)
ValueError: 'gtkagg' is not a valid value for backend; supported values are ['GTK3Agg', 'GTK3Cairo', 'MacOSX', 'nbAgg', 'Qt4Agg', 'Qt4Cairo', 'Qt5Agg', 'Qt5Cairo', 'TkAgg', 'TkCairo', 'WebAgg', 'WX', 'WXAgg', 'WXCairo', 'agg', 'cairo', 'pdf', 'pgf', 'ps', 'svg', 'template']
Platform & Versions
- Package Version : pylibtiff==0.6.0, tried with v0.5.1 too.
- Python Version : 3.8.10
- Ubuntu 20.04 aarch64
Workaround
This edit in lib/python3.8/site-packages/libtiff/script_options.py
allows my intended use. I noticed that "--no-gui" flag is not a valid command line option. Perhaps the documentation can be updated.
95 matplotlib.use('GTk3Agg')
dennis-glx commented
Fixed in #166. Closing.