[Debichem-devel] Bug#1123444: python-emmet-core: FTBFS: E Exception: Couldn't identify total number of kpt labels

Santiago Vila sanvila at debian.org
Tue Dec 16 20:28:51 GMT 2025


Package: src:python-emmet-core
Version: 0.84.2-2
Severity: serious
Tags: ftbfs forky sid

Dear maintainer:

During a rebuild of all packages in unstable, this package failed to build.

Below you will find the last part of the build log (probably the most
relevant part, but not necessarily). If required, the full build log
is available here:

https://people.debian.org/~sanvila/build-logs/202512/

About the archive rebuild: The build was made on virtual machines from AWS,
using sbuild and a reduced chroot with only build-essential packages.

If you cannot reproduce the bug please contact me privately, as I
am willing to provide ssh access to a virtual machine where the bug is
fully reproducible.

If this is really a bug in one of the build-depends, please use
reassign and add an affects on src:python-emmet-core, so that this is still
visible in the BTS web page for this package.

Thanks.

--------------------------------------------------------------------------------
[...]
 debian/rules clean
dh clean --buildsystem=pybuild
   dh_auto_clean -O--buildsystem=pybuild
   dh_autoreconf_clean -O--buildsystem=pybuild
   dh_clean -O--buildsystem=pybuild
 debian/rules binary
dh binary --buildsystem=pybuild
   dh_update_autotools_config -O--buildsystem=pybuild
   dh_autoreconf -O--buildsystem=pybuild
   dh_auto_configure -O--buildsystem=pybuild
   dh_auto_build -O--buildsystem=pybuild
I: pybuild plugin_pyproject:131: Building wheel for python3.14 with "build" module
I: pybuild base:317: python3.14 -m build --skip-dependency-check --no-isolation --wheel --outdir /<<PKGBUILDDIR>>/.pybuild/cpython3_3.14_emmet-core  
* Building wheel...
WARNING setuptools_scm.pyproject_reading toml section missing 'pyproject.toml does not contain a tool.setuptools_scm section'

[... snipped ...]

tests/test_xrd.py::test_target_detection[CoKb1] PASSED                   [ 77%]
tests/test_xrd.py::test_target_detection[AgKa] PASSED                    [ 77%]
tests/test_xrd.py::test_target_detection[AgKa2] PASSED                   [ 78%]
tests/test_xrd.py::test_target_detection[AgKa1] PASSED                   [ 79%]
tests/test_xrd.py::test_target_detection[AgKb1] PASSED                   [ 79%]
tests/test_xrd.py::test_from_target[CuKa] PASSED                         [ 80%]
tests/test_xrd.py::test_from_target[CuKa2] PASSED                        [ 80%]
tests/test_xrd.py::test_from_target[CuKa1] PASSED                        [ 81%]
tests/test_xrd.py::test_from_target[CuKb1] PASSED                        [ 81%]
tests/test_xrd.py::test_from_target[MoKa] PASSED                         [ 82%]
tests/test_xrd.py::test_from_target[MoKa2] PASSED                        [ 82%]
tests/test_xrd.py::test_from_target[MoKa1] PASSED                        [ 83%]
tests/test_xrd.py::test_from_target[MoKb1] PASSED                        [ 83%]
tests/test_xrd.py::test_from_target[CrKa] PASSED                         [ 84%]
tests/test_xrd.py::test_from_target[CrKa2] PASSED                        [ 84%]
tests/test_xrd.py::test_from_target[CrKa1] PASSED                        [ 85%]
tests/test_xrd.py::test_from_target[CrKb1] PASSED                        [ 86%]
tests/test_xrd.py::test_from_target[FeKa] PASSED                         [ 86%]
tests/test_xrd.py::test_from_target[FeKa2] PASSED                        [ 87%]
tests/test_xrd.py::test_from_target[FeKa1] PASSED                        [ 87%]
tests/test_xrd.py::test_from_target[FeKb1] PASSED                        [ 88%]
tests/test_xrd.py::test_from_target[CoKa] PASSED                         [ 88%]
tests/test_xrd.py::test_from_target[CoKa2] PASSED                        [ 89%]
tests/test_xrd.py::test_from_target[CoKa1] PASSED                        [ 89%]
tests/test_xrd.py::test_from_target[CoKb1] PASSED                        [ 90%]
tests/test_xrd.py::test_from_target[AgKa] PASSED                         [ 90%]
tests/test_xrd.py::test_from_target[AgKa2] PASSED                        [ 91%]
tests/test_xrd.py::test_from_target[AgKa1] PASSED                        [ 91%]
tests/test_xrd.py::test_from_target[AgKb1] PASSED                        [ 92%]
tests/test_xrd.py::test_schema PASSED                                    [ 93%]
tests/vasp/test_calc_types.py::test_enums PASSED                         [ 93%]
tests/vasp/test_materials.py::test_make_mat PASSED                       [ 94%]
tests/vasp/test_materials.py::test_make_deprecated_mat PASSED            [ 94%]
tests/vasp/test_materials.py::test_schema PASSED                         [ 95%]
tests/vasp/test_vasp.py::test_task_type FAILED                           [ 95%]
tests/vasp/test_vasp.py::test_run_type PASSED                            [ 96%]
tests/vasp/test_vasp.py::test_validator PASSED                           [ 96%]
tests/vasp/test_vasp.py::test_validator_magmom PASSED                    [ 97%]
tests/vasp/test_vasp.py::test_validator_failed_symmetry PASSED           [ 97%]
tests/vasp/test_vasp.py::test_computed_entry PASSED                      [ 98%]
tests/vasp/test_vasp.py::test_ldau PASSED                                [ 98%]
tests/vasp/test_vasp.py::test_ldau_validation PASSED                     [ 99%]
tests/vasp/test_vasp.py::test_potcar_stats_check PASSED                  [100%]

=================================== FAILURES ===================================
________________________________ test_task_type ________________________________

inputs = {'incar': {'ICHARG': 11}, 'kpoints': {'labels': ['A']}}

    def task_type(
        inputs: Dict[Literal["incar", "poscar", "kpoints", "potcar"], Dict]
    ) -> TaskType:
        """
        Determine task type from vasp inputs.
    
        Args:
            inputs: inputs dict with an incar, kpoints, potcar, and poscar dictionaries.
    
        Returns:
            The task type.
        """
    
        calc_type = []
        incar = inputs.get("incar", {})
        kpts = inputs.get("kpoints") or {}  # kpoints can be None, then want a dict
    
        if not isinstance(kpts, dict):
            kpts = kpts.as_dict()
    
        if incar.get("ICHARG", 0) > 10:
            try:
                kpt_labels = kpts.get("labels") or []
>               num_kpt_labels = len(list(filter(None.__ne__, kpt_labels)))
                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E               TypeError: NotImplemented should not be used in a boolean context

../cpython3_3.14_emmet-core/build/emmet/core/vasp/calc_types/utils.py:77: TypeError

The above exception was the direct cause of the following exception:

    def test_task_type():
        # TODO: Switch this to actual inputs?
        input_types = [
            ("NSCF Line", {"incar": {"ICHARG": 11}, "kpoints": {"labels": ["A"]}}),
            ("NSCF Uniform", {"incar": {"ICHARG": 11}}),
            ("Dielectric", {"incar": {"LEPSILON": True}}),
            ("DFPT Dielectric", {"incar": {"LEPSILON": True, "IBRION": 7}}),
            ("DFPT Dielectric", {"incar": {"LEPSILON": True, "IBRION": 8}}),
            ("DFPT", {"incar": {"IBRION": 7}}),
            ("DFPT", {"incar": {"IBRION": 8}}),
            ("Static", {"incar": {"NSW": 0}}),
        ]
    
        for _type, inputs in input_types:
>           assert task_type(inputs) == TaskType(_type)
                   ^^^^^^^^^^^^^^^^^

tests/vasp/test_vasp.py:26: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

inputs = {'incar': {'ICHARG': 11}, 'kpoints': {'labels': ['A']}}

    def task_type(
        inputs: Dict[Literal["incar", "poscar", "kpoints", "potcar"], Dict]
    ) -> TaskType:
        """
        Determine task type from vasp inputs.
    
        Args:
            inputs: inputs dict with an incar, kpoints, potcar, and poscar dictionaries.
    
        Returns:
            The task type.
        """
    
        calc_type = []
        incar = inputs.get("incar", {})
        kpts = inputs.get("kpoints") or {}  # kpoints can be None, then want a dict
    
        if not isinstance(kpts, dict):
            kpts = kpts.as_dict()
    
        if incar.get("ICHARG", 0) > 10:
            try:
                kpt_labels = kpts.get("labels") or []
                num_kpt_labels = len(list(filter(None.__ne__, kpt_labels)))
            except Exception as e:
>               raise Exception("Couldn't identify total number of kpt labels") from e
E               Exception: Couldn't identify total number of kpt labels

../cpython3_3.14_emmet-core/build/emmet/core/vasp/calc_types/utils.py:79: Exception
=============================== warnings summary ===============================
../cpython3_3.14_emmet-core/build/emmet/core/vasp/calculation.py:304
  /<<PKGBUILDDIR>>/.pybuild/cpython3_3.14_emmet-core/build/emmet/core/vasp/calculation.py:304: PydanticDeprecatedSince20: `pydantic.config.Extra` is deprecated, use literal values instead (e.g. `extra='allow'`). Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.12/migration/
    class ElectronicStep(BaseModel, extra=Extra.allow):  # type: ignore

../cpython3_3.14_emmet-core/build/emmet/core/vasp/calculation.py:328
  /<<PKGBUILDDIR>>/.pybuild/cpython3_3.14_emmet-core/build/emmet/core/vasp/calculation.py:328: PydanticDeprecatedSince20: `pydantic.config.Extra` is deprecated, use literal values instead (e.g. `extra='allow'`). Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.12/migration/
    class IonicStep(BaseModel, extra=Extra.allow):  # type: ignore

.pybuild/test_python3.14/tests/molecules/test_atomic.py::test_partial_charges
  /<<PKGBUILDDIR>>/.pybuild/test_python3.14/tests/molecules/test_atomic.py:15: FutureWarning: We strongly discourage using a default `mode`, it would be set to `r` now but would not be allowed after 2025-06-01
    with zopen(test_dir / "liec_tasks.json.gz") as f:

.pybuild/test_python3.14/tests/molecules/test_atomic.py: 12 warnings
.pybuild/test_python3.14/tests/molecules/test_metal_binding.py: 1 warning
.pybuild/test_python3.14/tests/molecules/test_mol_thermo.py: 4 warnings
.pybuild/test_python3.14/tests/molecules/test_orbitals.py: 4 warnings
.pybuild/test_python3.14/tests/molecules/test_summary.py: 1 warning
.pybuild/test_python3.14/tests/molecules/test_vibration.py: 2 warnings
.pybuild/test_python3.14/tests/test_absorption.py: 1 warning
.pybuild/test_python3.14/tests/test_chemenv.py: 14 warnings
.pybuild/test_python3.14/tests/test_elasticity.py: 1 warning
.pybuild/test_python3.14/tests/test_magnetism.py: 10 warnings
.pybuild/test_python3.14/tests/test_oxidation_states.py: 14 warnings
.pybuild/test_python3.14/tests/test_polar.py: 2 warnings
.pybuild/test_python3.14/tests/test_provenance.py: 2 warnings
.pybuild/test_python3.14/tests/test_thermo.py: 5 warnings
.pybuild/test_python3.14/tests/test_xrd.py: 48 warnings
.pybuild/test_python3.14/tests/vasp/test_vasp.py: 12 warnings
  /usr/lib/python3/dist-packages/pydantic/main.py:250: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).
    validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self)

.pybuild/test_python3.14/tests/molecules/test_bonds.py::test_bonding
  /<<PKGBUILDDIR>>/.pybuild/test_python3.14/tests/molecules/test_bonds.py:15: FutureWarning: We strongly discourage using a default `mode`, it would be set to `r` now but would not be allowed after 2025-06-01
    with zopen(test_dir / "liec_tasks.json.gz") as f:

.pybuild/test_python3.14/tests/molecules/test_mol_thermo.py::test_thermo
  /<<PKGBUILDDIR>>/.pybuild/test_python3.14/tests/molecules/test_mol_thermo.py:15: FutureWarning: We strongly discourage using a default `mode`, it would be set to `r` now but would not be allowed after 2025-06-01
    with zopen(test_dir / "liec_tasks.json.gz") as f:

.pybuild/test_python3.14/tests/molecules/test_vibration.py::test_vibration
  /<<PKGBUILDDIR>>/.pybuild/test_python3.14/tests/molecules/test_vibration.py:14: FutureWarning: We strongly discourage using a default `mode`, it would be set to `r` now but would not be allowed after 2025-06-01
    with zopen(test_dir / "liec_tasks.json.gz") as f:

.pybuild/test_python3.14/tests/qchem/test_molecules.py::test_schema
  /<<PKGBUILDDIR>>/.pybuild/test_python3.14/tests/qchem/test_molecules.py:84: PydanticDeprecatedSince20: The `schema` method is deprecated; use `model_json_schema` instead. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.12/migration/
    MoleculeDoc.schema()

.pybuild/test_python3.14/tests/test_calculation.py: 8 warnings
.pybuild/test_python3.14/tests/test_task.py: 6 warnings
  /usr/lib/python3/dist-packages/pymatgen/io/vasp/outputs.py:1328: UserWarning: No POTCAR file with matching TITEL fields was found in
  
    if potcar := self.get_potcars(path):

.pybuild/test_python3.14/tests/test_calculation.py: 8 warnings
.pybuild/test_python3.14/tests/test_task.py: 6 warnings
  /usr/lib/python3/dist-packages/pymatgen/io/vasp/outputs.py:1339: UserWarning: No POTCAR file with matching TITEL fields was found in
  
    potcar = self.get_potcars(path)

.pybuild/test_python3.14/tests/test_electrodes.py::test_InsertionDocs
  /<<PKGBUILDDIR>>/.pybuild/cpython3_3.14_emmet-core/build/emmet/core/electrode.py:304: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).
    d["last_updated"] = datetime.utcnow()

.pybuild/test_python3.14/tests/test_electrodes.py: 12 warnings
  /<<PKGBUILDDIR>>/.pybuild/cpython3_3.14_emmet-core/build/emmet/core/electrode.py:540: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).
    "last_updated": datetime.utcnow(),

.pybuild/test_python3.14/tests/test_provenance.py::test_from_snls
.pybuild/test_python3.14/tests/test_provenance.py::test_from_snls
.pybuild/test_python3.14/tests/test_provenance.py::test_from_snls
  /<<PKGBUILDDIR>>/.pybuild/test_python3.14/tests/test_provenance.py:24: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).
    created_at=datetime.utcnow(),

.pybuild/test_python3.14/tests/test_provenance.py::test_from_snls
  /<<PKGBUILDDIR>>/.pybuild/test_python3.14/tests/test_provenance.py:58: PydanticDeprecatedSince20: The `dict` method is deprecated; use `model_dump` instead. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.12/migration/
    assert doc.dict(exclude_none=True)["property_name"] == "provenance"

.pybuild/test_python3.14/tests/test_structure_metadata.py::test_schema
  /<<PKGBUILDDIR>>/.pybuild/test_python3.14/tests/test_structure_metadata.py:63: PydanticDeprecatedSince20: The `schema` method is deprecated; use `model_json_schema` instead. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.12/migration/
    StructureMetadata.schema()

.pybuild/test_python3.14/tests/test_thermo.py::test_from_entries
.pybuild/test_python3.14/tests/test_thermo.py::test_from_entries
.pybuild/test_python3.14/tests/test_thermo.py::test_from_entries
.pybuild/test_python3.14/tests/test_thermo.py::test_from_entries
.pybuild/test_python3.14/tests/test_thermo.py::test_from_entries
  /<<PKGBUILDDIR>>/.pybuild/cpython3_3.14_emmet-core/build/emmet/core/thermo.py:254: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).
    last_updated=d.get("last_updated", datetime.utcnow()),

.pybuild/test_python3.14/tests/test_xrd.py::test_schema
  /<<PKGBUILDDIR>>/.pybuild/test_python3.14/tests/test_xrd.py:45: PydanticDeprecatedSince20: The `schema` method is deprecated; use `model_json_schema` instead. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.12/migration/
    XRDDoc.schema()

.pybuild/test_python3.14/tests/vasp/test_materials.py::test_make_mat
.pybuild/test_python3.14/tests/vasp/test_materials.py::test_make_deprecated_mat
  /<<PKGBUILDDIR>>/.pybuild/test_python3.14/tests/vasp/test_materials.py:13: FutureWarning: We strongly discourage using a default `mode`, it would be set to `r` now but would not be allowed after 2025-06-01
    with zopen(test_dir / "test_si_tasks.json.gz") as f:

.pybuild/test_python3.14/tests/vasp/test_materials.py::test_schema
  /<<PKGBUILDDIR>>/.pybuild/test_python3.14/tests/vasp/test_materials.py:48: PydanticDeprecatedSince20: The `schema` method is deprecated; use `model_json_schema` instead. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.12/migration/
    MaterialsDoc.schema()

.pybuild/test_python3.14/tests/vasp/test_vasp.py::test_validator
  /<<PKGBUILDDIR>>/.pybuild/test_python3.14/tests/vasp/test_vasp.py:46: FutureWarning: We strongly discourage using a default `mode`, it would be set to `r` now but would not be allowed after 2025-06-01
    with zopen(test_dir / "test_si_tasks.json.gz") as f:

.pybuild/test_python3.14/tests/vasp/test_vasp.py::test_validator_magmom
  /<<PKGBUILDDIR>>/.pybuild/test_python3.14/tests/vasp/test_vasp.py:61: FutureWarning: We strongly discourage using a default `mode`, it would be set to `r` now but would not be allowed after 2025-06-01
    with zopen(test_dir / "task_doc_mp-2766060.json.gz") as f:

.pybuild/test_python3.14/tests/vasp/test_vasp.py::test_validator_failed_symmetry
  /<<PKGBUILDDIR>>/.pybuild/test_python3.14/tests/vasp/test_vasp.py:91: FutureWarning: We strongly discourage using implicit binary/text `mode`, and this would not be allowed after 2025-06-01. I.e. you should pass t/b in `mode`.
    with zopen(test_dir / "failed_elastic_task.json.gz", "r") as f:

.pybuild/test_python3.14/tests/vasp/test_vasp.py::test_ldau
  /<<PKGBUILDDIR>>/.pybuild/test_python3.14/tests/vasp/test_vasp.py:106: FutureWarning: We strongly discourage using a default `mode`, it would be set to `r` now but would not be allowed after 2025-06-01
    with zopen(test_dir / "test_task.json") as f:

.pybuild/test_python3.14/tests/vasp/test_vasp.py::test_ldau_validation
  /<<PKGBUILDDIR>>/.pybuild/cpython3_3.14_emmet-core/build/emmet/core/vasp/validation.py:182: UserWarning: Co without an oxidation state is initialized as low spin by default in Pymatgen. If this default behavior is not desired, please set the spin on the magmom on the site directly to ensure correct initialization.
    valid_ismear = valid_input_set.incar.get("ISMEAR", 1)

.pybuild/test_python3.14/tests/vasp/test_vasp.py::test_ldau_validation
  /<<PKGBUILDDIR>>/.pybuild/cpython3_3.14_emmet-core/build/emmet/core/vasp/validation.py:193: UserWarning: Co without an oxidation state is initialized as low spin by default in Pymatgen. If this default behavior is not desired, please set the spin on the magmom on the site directly to ensure correct initialization.
    valid_encut = valid_input_set.incar["ENCUT"]

.pybuild/test_python3.14/tests/vasp/test_vasp.py::test_ldau_validation
  /<<PKGBUILDDIR>>/.pybuild/cpython3_3.14_emmet-core/build/emmet/core/vasp/validation.py:278: UserWarning: Co without an oxidation state is initialized as low spin by default in Pymatgen. If this default behavior is not desired, please set the spin on the magmom on the site directly to ensure correct initialization.
    if valid_input_set.incar.get("LDAU", False) or len(input_hubbards) > 0:

.pybuild/test_python3.14/tests/vasp/test_vasp.py::test_ldau_validation
  /<<PKGBUILDDIR>>/.pybuild/cpython3_3.14_emmet-core/build/emmet/core/vasp/validation.py:283: UserWarning: Co without an oxidation state is initialized as low spin by default in Pymatgen. If this default behavior is not desired, please set the spin on the magmom on the site directly to ensure correct initialization.
    valid_input_set.incar.get("LDAUU", []),

.pybuild/test_python3.14/tests/vasp/test_vasp.py::test_potcar_stats_check
  /<<PKGBUILDDIR>>/.pybuild/test_python3.14/tests/vasp/test_vasp.py:133: FutureWarning: We strongly discourage using a default `mode`, it would be set to `r` now but would not be allowed after 2025-06-01
    with zopen(test_dir / "CoF_TaskDoc.json") as f:

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
FAILED tests/vasp/test_vasp.py::test_task_type - Exception: Couldn't identify...
==== 1 failed, 164 passed, 25 skipped, 9 deselected, 204 warnings in 17.08s ====
make[1]: *** [debian/rules:22: override_dh_auto_test] Error 1
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
make: *** [debian/rules:19: binary] Error 2
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2
--------------------------------------------------------------------------------



More information about the Debichem-devel mailing list