Skip to content

fix: pycifrw from PyPI is not working with diffpy.structure=3.3.1rc0 #144

@ycexiao

Description

@ycexiao

Problem

Running the commands

pip install diffpy.structure==3.3.1rc0
cd /path/to/diffpy.structure
pytest

will get the error

FAILED tests/test_loadstructure.py::TestLoadStructure::test_badfile - CifFile.yapps3_compiled_rt.YappsSyntaxError: SyntaxError@char0(Trying to find one of END, data_heading)
FAILED tests/test_p_cif.py::TestP_cif::test_parse - CifFile.yapps3_compiled_rt.YappsSyntaxError: SyntaxError@char552(Trying to find one of data_value_1, start_sc_line)
FAILED tests/test_p_cif.py::TestP_cif::test_parseFile - CifFile.yapps3_compiled_rt.YappsSyntaxError: SyntaxError@char552(Trying to find one of data_value_1, start_sc_line)
FAILED tests/test_p_cif.py::TestP_cif::test_parseLines - CifFile.yapps3_compiled_rt.YappsSyntaxError: SyntaxError@char565(Trying to find one of data_value_1, start_sc_line)
FAILED tests/test_p_discus.py::TestP_discus::test_spdiameter_parsing - CifFile.yapps3_compiled_rt.YappsSyntaxError: SyntaxError@char0(Trying to find one of END, data_heading)
FAILED tests/test_p_discus.py::TestP_discus::test_stepcut_parsing - CifFile.yapps3_compiled_rt.YappsSyntaxError: SyntaxError@char0(Trying to find one of END, data_heading)
FAILED tests/test_p_pdffit.py::TestP_pdffit::test_spdiameter_parsing - CifFile.yapps3_compiled_rt.YappsSyntaxError: SyntaxError@char0(Trying to find one of END, data_heading)
FAILED tests/test_p_pdffit.py::TestP_pdffit::test_stepcut_parsing - CifFile.yapps3_compiled_rt.YappsSyntaxError: SyntaxError@char0(Trying to find one of END, data_heading)

Reinstall pycifrw from conda-forge can fix this problem.

conda config --add channels conda-forge
conda install pycifrw

Proposed solution

  • Add the instruction to reinstall pycifrw in the installation instructions.
  • Fix the problem so we don't have to reinstall it from conda-forge
  • Remove the reinstalling instruction after it is fixed.

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