diffpy / diffpy.pdfmorph

An easy way to compare PDFs.
https://www.diffpy.org/diffpy.pdfmorph/
Other
3 stars 14 forks source link

Fix TypeError: loadtxt() got an unexpected keyword argument 'headers' in src/diffpy/pdfmorph/tools.py #144

Open bobleesj opened 16 hours ago

bobleesj commented 16 hours ago

Problem

FAILED tests/test_pdfmorphapp.py::TestApp::test_parser_systemexits - TypeError: loadtxt() got an unexpected keyword argument 'headers'
FAILED tests/test_pdfmorphapp.py::TestApp::test_morphsequence - TypeError: loadtxt() got an unexpected keyword argument 'headers'
FAILED tests/test_pdfmorphio.py::TestApp::test_morph_outputs - TypeError: loadtxt() got an unexpected keyword argument 'headers'
FAILED tests/test_tools.py::TestTools::test_field_sort - TypeError: loadtxt() got an unexpected keyword argument 'headers'

Found in

tests/test_tools.py:80: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
src/diffpy/pdfmorph/tools.py:203: in field_sort
    fhd = parsers.loadData(path, headers=True)
_ _ _ _ _ _

Proposed solution

Investigate the problem a bit more and update here.

bobleesj commented 16 hours ago
./../../miniconda3/envs/diffpy_utils_env/lib/python3.13/site-packages/diffpy.utils-3.0.0-py3.7.egg/diffpy/utils/parsers/loaddata.py:100: TypeError
==========================

It seems like the error is coming from diffpy.utils