[Debichem-devel] Bug#1000419: pymatgen: FTBFS - Test failure: BSPlotterProjectedTest.test_methods

Stefano Rivera stefanor at debian.org
Mon Nov 22 21:35:20 GMT 2021


Source: pymatgen
Version: 2022.0.14+dfsg1-1
Severity: serious
Justification: FTBFS

Presumably due to a new matplotlib, but I'm just guessing...

.pybuild/test_python3.9/pymatgen/electronic_structure/tests/test_plotter.py . [ 55%]
.........F

=================================== FAILURES ===================================
_____________________ BSPlotterProjectedTest.test_methods ______________________

self = <electronic_structure.tests.test_plotter.BSPlotterProjectedTest testMethod=test_methods>

    def test_methods(self):
        self.plotter.get_elt_projected_plots().close()
        self.plotter.get_elt_projected_plots_color().close()
        self.plotter.get_projected_plots_dots({"Cu": ["d", "s"], "O": ["p"]}).close()
>       self.plotter.get_projected_plots_dots_patom_pmorb(
            {"Cu": ["dxy", "s", "px"], "O": ["px", "py", "pz"]},
            {"Cu": [3, 5], "O": [1]},
        ).close()

.pybuild/test_python3.9/pymatgen/electronic_structure/tests/test_plotter.py:220:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.pybuild/test_python3.9/pymatgen/electronic_structure/plotter.py:1651: in get_projected_plots_dots_patom_pmorb
    plt.subplot(row + 1, 2, count)
/usr/lib/python3/dist-packages/matplotlib/pyplot.py:1268: in subplot
    key = SubplotSpec._from_subplot_args(fig, args)
/usr/lib/python3/dist-packages/matplotlib/gridspec.py:595: in _from_subplot_args
    gs = GridSpec._check_gridspec_exists(figure, rows, cols)
/usr/lib/python3/dist-packages/matplotlib/gridspec.py:223: in _check_gridspec_exists
    return GridSpec(nrows, ncols, figure=figure)
/usr/lib/python3/dist-packages/matplotlib/gridspec.py:383: in __init__
    super().__init__(nrows, ncols,
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <[AttributeError("'GridSpec' object has no attribute '_row_height_ratios'") raised in repr()] GridSpec object at 0x7f507628bf40>
nrows = 5.5, ncols = 2, height_ratios = None, width_ratios = None

    def __init__(self, nrows, ncols, height_ratios=None, width_ratios=None):
        """
        Parameters
        ----------
        nrows, ncols : int
            The number of rows and columns of the grid.
        width_ratios : array-like of length *ncols*, optional
            Defines the relative widths of the columns. Each column gets a
            relative width of ``width_ratios[i] / sum(width_ratios)``.
            If not given, all columns will have the same width.
        height_ratios : array-like of length *nrows*, optional
            Defines the relative heights of the rows. Each column gets a
            relative height of ``height_ratios[i] / sum(height_ratios)``.
            If not given, all rows will have the same height.
        """
        if not isinstance(nrows, Integral) or nrows <= 0:
>           raise ValueError(
                f"Number of rows must be a positive integer, not {nrows!r}")
E           ValueError: Number of rows must be a positive integer, not 5.5

/usr/lib/python3/dist-packages/matplotlib/gridspec.py:47: ValueError
----------------------------- Captured stdout call -----------------------------
You do not want to sum projection over orbitals.
You do not want to sum projection over atoms.
Number of subfigures: 9
{'start_index': 0, 'end_index': 15, 'name': '\\Gamma-X'}
{'start_index': 16, 'end_index': 31, 'name': 'X-M'}
{'start_index': 32, 'end_index': 47, 'name': 'M-\\Gamma'}
{'start_index': 48, 'end_index': 63, 'name': '\\Gamma-R'}
{'start_index': 64, 'end_index': 79, 'name': 'R-X'}
{'start_index': 80, 'end_index': 95, 'name': 'M-R'}
dictio_d: {'Cu': ['dxy', 's', 'px'], 'O': ['px', 'py', 'pz']}
dictpa_d: {'Cu': ['3', '5'], 'O': ['1']}
=============================== warnings summary ===============================


See: https://buildd.debian.org/status/fetch.php?pkg=pymatgen&arch=amd64&ver=2022.0.14%2Bdfsg1-1%2Bb1&stamp=1637567905&raw=0

SR



More information about the Debichem-devel mailing list