Testing testpyrgsimplot ... FAILED
Message: will run ./testpyrgsimplot for no longer than 600 seconds.
============================= test session starts ==============================
platform linux -- Python 3.12.4, pytest-8.3.3, pluggy-1.5.0 -- /sasbuild/tools/python-3.12.4/bin/python3
cachedir: .pytest_cache
rootdir: /workspaces/xmm_sas/packages/pyrgsimplot
plugins: anyio-4.6.2.post1
collecting ... collected 7 items

test_pyrgsimplot.py::test_set_ylabel PASSED                              [ 14%]
test_pyrgsimplot.py::test_set_xlabel PASSED                              [ 28%]
test_pyrgsimplot.py::test_get_observation_details PASSED                 [ 42%]
test_pyrgsimplot.py::test_general_pdf FAILED                             [ 57%]
test_pyrgsimplot.py::test_general_png PASSED                             [ 71%]
test_pyrgsimplot.py::test_general_pdf2 PASSED                            [ 85%]
test_pyrgsimplot.py::test_general_png2 PASSED                            [100%]

=================================== FAILURES ===================================
_______________________________ test_general_pdf _______________________________

    def test_general_pdf():
        spatialset = 'test_data/RGS/spatial_r1.fits'
        endispset = 'test_data/RGS/pi_r1.fits'
        srclist = 'test_data/RGS/srclistr1.FIT'
    
        # rgsimplot spatialset=test_data/RGS/spatial_r1.fits endispset=test_data/RGS/pi_r1.fits srclistset=test_data/RGS/srclistr1.FIT srcidlist=3 withspatialset=yes withendispset=yes withspatialregionset=yes withendispregionset=yes orderlist=1,2 colourmap=plasma plotfile=test_plot norm=log
        dict_values = dict()
        dict_values.update({'device' : 'no'})
        dict_values.update({'spatialset' : spatialset})
        dict_values.update({'endispset' : endispset})
        dict_values.update({'srcidlist' : 3})
        dict_values.update({'srclistset' : srclist})
        dict_values.update({'withspatialset' : 'yes'})
        dict_values.update({'withendispset' : 'yes'})
        dict_values.update({'withspatialregionsets' : 'yes'})
        dict_values.update({'dark_mode' : 'no'})
        dict_values.update({'withendispregionsets' : 'yes'})
        dict_values.update({'orderlist' : '1,2'})
        dict_values.update({'colour' : 'plasma'})
        dict_values.update({'plotfile' : 'test_plot.pdf'})
        dict_values.update({'colourmap' : 'pow'})
        dict_values.update({'gamma' : 0.5})
        dict_values.update({'inverted' : 'no'})
>       rgsimplot.run(dict_values)

test_pyrgsimplot.py:62: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../../../lib/python/pysas/pyrgsimplot/pyrgsimplot.py:456: in run
    status = sasplt.merge_pdf(pdf_files, plot_title + '.{}'.format(out_format))
../../../lib/python/pysas/pysasplot_utils/pysasplot_utils.py:678: in merge_pdf
    merger = PdfMerger()
/sasbuild/tools/python-3.12.4/lib/python3.12/site-packages/pypdf/_merger.py:42: in __init__
    deprecation_with_replacement("PdfMerger", "PdfWriter", "5.0.0")
/sasbuild/tools/python-3.12.4/lib/python3.12/site-packages/pypdf/_utils.py:384: in deprecation_with_replacement
    deprecation(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

msg = 'PdfMerger is deprecated and was removed in pypdf 5.0.0. Use PdfWriter instead.'

    def deprecation(msg: str) -> None:
>       raise DeprecationError(msg)
E       pypdf.errors.DeprecationError: PdfMerger is deprecated and was removed in pypdf 5.0.0. Use PdfWriter instead.

/sasbuild/tools/python-3.12.4/lib/python3.12/site-packages/pypdf/_utils.py:371: DeprecationError
----------------------------- Captured stdout call -----------------------------
Executing /workspaces/xmm_sas/lib/python/pysas/pyrgsimplot/pyrgsimplot.py {'device': 'no', 'spatialset': 'test_data/RGS/spatial_r1.fits', 'endispset': 'test_data/RGS/pi_r1.fits', 'srcidlist': 3, 'srclistset': 'test_data/RGS/srclistr1.FIT', 'withspatialset': 'yes', 'withendispset': 'yes', 'withspatialregionsets': 'yes', 'dark_mode': 'no', 'withendispregionsets': 'yes', 'orderlist': '1,2', 'colour': 'plasma', 'plotfile': 'test_plot.pdf', 'colourmap': 'pow', 'gamma': 0.5, 'inverted': 'no'}
----------------------------- Captured stderr call -----------------------------
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-sasbuild'
------------------------------ Captured log call -------------------------------
INFO     pyrgsimplot:logger.py:158 Starting processing the spatial energy block...
DEBUG    pyrgsimplot:logger.py:158 Running getobservationdetails...
DEBUG    pyrgsimplot:logger.py:158 Running getarrayattributes...
DEBUG    pyrgsimplot:logger.py:158 Collecting the spatial regions...
DEBUG    pyrgsimplot:logger.py:158 Spatial regions collected.
INFO     pyrgsimplot:logger.py:158 Plotting /workspaces/xmm_sas/packages/pyrgsimplot/test/test_plot.
DEBUG    pyrgsimplot:logger.py:158 Evaluating the coordinates of the source list...
DEBUG    pyrgsimplot:logger.py:158 Transforming unit...
DEBUG    pyrgsimplot:logger.py:158 Transforming unit...
DEBUG    pyrgsimplot:logger.py:158 Transforming unit...
DEBUG    pyrgsimplot:logger.py:158 Transforming unit...
DEBUG    pyrgsimplot:logger.py:158 Transforming unit...
DEBUG    pyrgsimplot:logger.py:158 Transforming unit...
DEBUG    pyrgsimplot:logger.py:158 Saving /workspaces/xmm_sas/packages/pyrgsimplot/test/test_plot_spatial pdf.
INFO     pyrgsimplot:logger.py:158 Created /workspaces/xmm_sas/packages/pyrgsimplot/test/test_plot_spatial.
INFO     pyrgsimplot:logger.py:158 Starting energy dispersion block...
DEBUG    pyrgsimplot:logger.py:158 Running getobservationdetails...
DEBUG    pyrgsimplot:logger.py:158 Running getarrayattributes...
DEBUG    pyrgsimplot:logger.py:158 Selecting regions for energy dispersion plot...
DEBUG    pyrgsimplot:logger.py:158 Energy dispersion regions collected.
INFO     pyrgsimplot:logger.py:158 Plotting /workspaces/xmm_sas/packages/pyrgsimplot/test/test_plot.
DEBUG    pyrgsimplot:logger.py:158 Evaluating the coordinates of the source list...
DEBUG    pyrgsimplot:logger.py:158 Transforming unit...
DEBUG    pyrgsimplot:logger.py:158 Transforming unit...
DEBUG    pyrgsimplot:logger.py:158 Transforming unit...
DEBUG    pyrgsimplot:logger.py:158 Transforming unit...
DEBUG    pyrgsimplot:logger.py:158 Transforming unit...
DEBUG    pyrgsimplot:logger.py:158 Transforming unit...
DEBUG    pyrgsimplot:logger.py:158 Saving /workspaces/xmm_sas/packages/pyrgsimplot/test/test_plot_endisp pdf.
INFO     pyrgsimplot:logger.py:158 Created /workspaces/xmm_sas/packages/pyrgsimplot/test/test_plot_endisp.
DEBUG    pyrgsimplot:logger.py:158 Merging PDFs... (['/workspaces/xmm_sas/packages/pyrgsimplot/test/test_plot_spatial.pdf', '/workspaces/xmm_sas/packages/pyrgsimplot/test/test_plot_endisp.pdf', '/workspaces/xmm_sas/packages/pyrgsimplot/test/test_plot2.pdf']).
=============================== warnings summary ===============================
test/test_pyrgsimplot.py::test_general_pdf
test/test_pyrgsimplot.py::test_general_pdf
test/test_pyrgsimplot.py::test_general_png
test/test_pyrgsimplot.py::test_general_png
test/test_pyrgsimplot.py::test_general_pdf2
test/test_pyrgsimplot.py::test_general_png2
  /sasbuild/tools/python-3.12.4/lib/python3.12/site-packages/astropy/wcs/wcs.py:537: FITSFixedWarning: RADECSYS= 'FK5 ' / stellar reference frame used 
  the RADECSYS keyword is deprecated, use RADESYSa.
    wcsprm = _wcs.Wcsprm(

test/test_pyrgsimplot.py::test_general_pdf
test/test_pyrgsimplot.py::test_general_pdf
test/test_pyrgsimplot.py::test_general_png
test/test_pyrgsimplot.py::test_general_png
test/test_pyrgsimplot.py::test_general_pdf2
test/test_pyrgsimplot.py::test_general_png2
  /sasbuild/tools/python-3.12.4/lib/python3.12/site-packages/astropy/wcs/wcs.py:805: FITSFixedWarning: 'datfix' made the change 'Set MJD-OBS to 57043.387106 from DATE-OBS.
  Set MJD-END to 57045.000741 from DATE-END'.
    warnings.warn(

test/test_pyrgsimplot.py::test_general_pdf
test/test_pyrgsimplot.py::test_general_png
test/test_pyrgsimplot.py::test_general_pdf2
  /sasbuild/tools/python-3.12.4/lib/python3.12/site-packages/astropy/units/core.py:2158: UnitsWarning: 'PI' did not parse as fits unit: At col 0, Unit 'PI' not supported by the FITS standard. Did you mean pix? If this is meant to be a custom unit, define it with 'u.def_unit'. To have it recognized inside a file reader or other code, enable it with 'u.add_enabled_units'. For details, see https://docs.astropy.org/en/latest/units/combining_and_defining.html
    warnings.warn(msg, UnitsWarning)

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
FAILED test_pyrgsimplot.py::test_general_pdf - pypdf.errors.DeprecationError:...
================== 1 failed, 6 passed, 15 warnings in 16.49s ===================
Error while running ./testpyrgsimplot
ERROR: one of the tests failed
