Closed jialay closed 10 months ago
Could you provide the source code of the class or a reproducer?
Also could you paste the error message ( you may need to run it with "RW_DEBUG" environmental variable set to True
)?
Could you provide the source code of the class or a reproducer? Also could you paste the error message ( you may need to run it with "RW_DEBUG" environmental variable set to
True
)?
the following code reproduce the error, it runs well, but only can't debug in reloadium, and just output the error code :“AttributeError: 'generator' object has no attribute 'copy' ”.
"
from pymatgen.core import Structure from pymatgen.analysis.magnetism.analyzer import CollinearMagneticStructureAnalyzer struct_a = Structure([[3, 0, 0], [0, 3, 0], [0, 0, 3]], ['Cr'], [[0, 0, 0]]) struct_b = Structure([[3, 0, 0], [0, 3, 0], [0, 0, 3]], ['Cr'], [[0, 0.5, 0.5]]) dup_ck = CollinearMagneticStructureAnalyzer(struct_a, overwrite_magmom_mode="none") if dup_ck.matches_ordering2(struct_b): print('same structure') "
I was unable to reproduce this.
Run on: Reloadium version: 1.2.0 Python version: 3.10.8 pymagnet version: 2023.7.20 Os: Linux q 5.4.0-42-generic #46-Ubuntu SMP Fri Jul 10 00:24:02 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
I managed to reproduce and fix this in Reloadium 1.2.1 and PyCharm plugin 1.2.1
when the class "CollinearMagneticStructureAnalyzer" from "pymatgen.analysis.magnetism.analyzer" is used, the reloadium failed to run or debug. The code is ok in original debug mode. I find that the 'struc' object is changed to a generator, which should not be.