Skip to content

Could not run Example.py #512

@FabriceOE

Description

@FabriceOE

(disclaimer I am very new to this, so it may be an obvious issue)

*I have a Python3 virtual env inside an Ubuntu machine

  • python3 -V -> Python 3.10.12
  • pip list
    Package Version

numpy 2.0.0
pip 22.0.2
setuptools 59.6.0
spglib 2.5.0

--> python3 example.py

[get_spacegroup]
Spacegroup of Silicon is Fd-3m (227).

[get_spacegroup]
Traceback (most recent call last):
File "/Symetry_venv/example/example.py", line 159, in
% spglib.get_spacegroup(silicon_ase)
File "
/Symetry_venv/sym_env/lib/python3.10/site-packages/spglib/spglib.py", line 1075, in get_spacegroup
dataset = get_symmetry_dataset(
File "/Symetry_venv/sym_env/lib/python3.10/site-packages/spglib/spglib.py", line 914, in get_symmetry_dataset
lattice, positions, numbers, _ = _expand_cell(cell)
File "
/Symetry_venv/sym_env/lib/python3.10/site-packages/spglib/spglib.py", line 2065, in _expand_cell
lattice = np.array(np.transpose(cell[0]), dtype="double", order="C")
TypeError: 'Atoms' object is not subscriptable

And so far I am stuck there
(I tried downgrading numpy to 1.26.4 but it did not help)

Thanks for you help,
Fab. O

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions