Bug#986785: binoculars gui does not work

Andrius Merkys merkys at debian.org
Mon Apr 12 09:01:53 BST 2021


Hi,

On 2021-04-12 10:42, Picca Frédéric-Emmanuel wrote:
> $ binoculars-gui 
> Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
> /usr/bin/binoculars-gui:1276: DeprecationWarning: In future, it will be an error for 'np.bool_' scalars to be interpreted as an index
>   box.setChecked(state)
> /usr/lib/python3/dist-packages/binoculars/util.py:536: H5pyDeprecationWarning: dataset.value has been deprecated. Use dataset[()] instead.
>   setattr(configobj, section, dict((key, config[section][key].value) for key in config[section]))
> /usr/lib/python3/dist-packages/binoculars/util.py:475: H5pyDeprecationWarning: dataset.value has been deprecated. Use dataset[()] instead.
>   setattr(meta, section, dict((key, group[key].value) for key in group))
> /usr/bin/binoculars-gui:834: MatplotlibDeprecationWarning: Adding an axes using the same arguments as a previous axes currently reuses the earlier instance.  In a future version, a new instance will always be created and returned.  Meanwhile, this warning can be suppressed, and the future behavior ensured, by passing a unique label to each axes instance.
>   self.ax = self.figure.add_subplot(plotrows, plotcolumns, i+1)
> Traceback (most recent call last):
>   File "/usr/bin/binoculars-gui", line 725, in update_key
>     self.plot()
>   File "/usr/bin/binoculars-gui", line 843, in plot
>     im = binoculars.plot.plot(space, self.figure, self.ax, log=log, loglog=loglog, label=basename, norm=norm[i])
>   File "/usr/lib/python3/dist-packages/binoculars/plot.py", line 157, in plot
>     fig._draggablecbar = DraggableColorbar(cbarwidget, im)  # we need to store this instance somewhere
>   File "/usr/lib/python3/dist-packages/binoculars/plot.py", line 16, in __init__
>     self.index = self.cycle.index(cbar.get_cmap().name)
> AttributeError: 'Colorbar' object has no attribute 'get_cmap'
> Aborted

This seems to be caused by matplotlib API change. From [1]:

colorbar.ColorbarBase.get_cmap (use ScalarMappable.get_cmap instead)

However, apart from that, I have no clue how to adapt to this change.

[1]
https://github.com/matplotlib/matplotlib/blob/a8831d57207db5e9bf681e30810ce0ea146f4a31/doc/api/prev_api_changes/api_changes_3.3.0/removals.rst

Hope this helps,
Andrius



More information about the debian-science-maintainers mailing list