Failed test for analysis_drp package in lsst stack installation


I am trying to install the latest weekly release of the lsst distribution on a cluster. This installation is exiting with an error for the analysis_drp package. I am attaching the last few lines of the terminal output as well as the full build.log below

2.99s call tests/
0.97s call python/lsst/analysis/drp/
0.82s call python/lsst/analysis/drp/
0.81s call python/lsst/analysis/drp/
0.78s call python/lsst/analysis/drp/
=========================== short test summary info ============================
FAILED tests/
============ 1 failed, 23 passed, 136 warnings in 62.76s (0:01:02) =============
Global pytest run: failed with 1
Failed test output:
Global pytest output is in /home/a_thakur/LSST/stack/miniconda3-py38_4.9.2-3.0.0/EupsBuildDir/Linux64/analysis_drp-g3ef4a34ec4+080ed862a4/analysis_drp-g3ef4a34ec4+080ed862a4/tests/.tests/pytest-analysis_drp.xml.failed
The following tests failed:
1 tests failed
scons: *** [checkTestStatus] Error 1
scons: building terminated because of errors.

  • exit -4
    eups distrib: Failed to build analysis_drp-g3ef4a34ec4+080ed862a4.eupspkg: Command:
    source “/home/a_thakur/LSST/conda/miniconda3-py38_4.9.2/envs/lsst-scipipe-3.0.0/eups/bin/”; export EUPS_PATH="/home/a_thakur/LSST/stack/miniconda3-py38_4.9.2-3.0.0"; (/home/a_thakur/LSST/stack/miniconda3-py38_4.9.2-3.0.0/EupsBuildDir/Linux64/analysis_drp-g3ef4a34ec4+080ed862a4/ >> /home/a_thakur/LSST/stack/miniconda3-py38_4.9.2-3.0.0/EupsBuildDir/Linux64/analysis_drp-g3ef4a34ec4+080ed862a4/build.log 2>&1 4>/home/a_thakur/LSST/stack/miniconda3-py38_4.9.2-3.0.0/EupsBuildDir/Linux64/analysis_drp-g3ef4a34ec4+080ed862a4/build.msg

build.log (1.2 MB)

Could someone please help me with this?


Can you attach /home/a_thakur/LSST/stack/miniconda3-py38_4.9.2-3.0.0/EupsBuildDir/Linux64/analysis_drp-g3ef4a34ec4+080ed862a4/analysis_drp-g3ef4a34ec4+080ed862a4/tests/data/test_scatterPlot.png and /home/a_thakur/LSST/stack/miniconda3-py38_4.9.2-3.0.0/EupsBuildDir/Linux64/analysis_drp-g3ef4a34ec4+080ed862a4/analysis_drp-g3ef4a34ec4+080ed862a4/tests/data/test_scatterPlot-failed-diff.png, as mentioned in the error message?

I’m guessing you have some personalized matplotlib configuration that is causing the test to fail.


Sure, please find them attached below:

The detailed errors will be in this file:

Can you please upload it?

That diff makes it look like slight font/spacing changes are the problem. We may need to change the test to be 1) more self-contained and less environment-dependent or 2) more tolerant of slight differences like this.

Hi Tim,

Here it is:pytest-analysis_drp.xml.failed (12.0 KB)

Thanks. The important information is:

=================================== FAILURES ===================================
_____ ScatterPlotWithTwoHistsTaskTestCase.test_ScatterPlotWithTwoHistsTask _____
[gw22] linux -- Python 3.8.13 /home/a_thakur/LSST/conda/miniconda3-py38_4.9.2/envs/lsst-scipipe-3.0.0/bin/python3.8

self = <test_scatterPlot.ScatterPlotWithTwoHistsTaskTestCase testMethod=test_ScatterPlotWithTwoHistsTask>

    def test_ScatterPlotWithTwoHistsTask(self):
        result =,
        filename_figure_tmp = os.path.join(self.testDir, "test_scatterPlot.png")
        diff = compare_images(filename_figure_tmp, filename_figure_ref, 0)
        if diff is not None:
>           raise ImageComparisonFailure(diff)
E           matplotlib.testing.exceptions.ImageComparisonFailure: Error: Image files did not match.
E             RMS Value: 11.985320918131878
E             Expected:  
E               /home/a_thakur/LSST/stack/miniconda3-py38_4.9.2-3.0.0/EupsBuildDir/Linux64/analysis_drp-g3ef4a34ec4+080ed862a4/analysis_drp-g3ef4a34ec4+080ed862a4/tests/test_output9ld3it_i/test_scatterPlot.png
E             Actual:    
E               /home/a_thakur/LSST/stack/miniconda3-py38_4.9.2-3.0.0/EupsBuildDir/Linux64/analysis_drp-g3ef4a34ec4+080ed862a4/analysis_drp-g3ef4a34ec4+080ed862a4/tests/data/test_scatterPlot.png
E             Difference:
E               /home/a_thakur/LSST/stack/miniconda3-py38_4.9.2-3.0.0/EupsBuildDir/Linux64/analysis_drp-g3ef4a34ec4+080ed862a4/analysis_drp-g3ef4a34ec4+080ed862a4/tests/data/test_scatterPlot-failed-diff.png
E             Tolerance: 
E               0

tests/ ImageComparisonFailure

@dtaranu it looks like you wrote this test so would you care to comment?

I had a similar issue because the packages in my local site-packages directory were of a different version from that in the rubin-env and the packages in the local directory took precedence. It is likely that the next weekly will also have this issue, but one way to get around it is to update the packages (mostly numpy and matplotlib) in your local directory or to temporarily move them elsewhere. None of these suggestions are clean, I agree.

I have filed a ticket for this issue. In the meantime, it seems that the cause is having an older, local matplotlib installed somewhere (Arun had 3.4.3 vs 3.5.1), or potentially a .matplotlibrc override.

I updated the matplotlib and numpy versions in site-packages to match the versions needed by the stack, but the installation still errors out with the same message.

What does this say?

import matplotlib

And do you have anything in ~/.matplotlibrc?

The output for matplotlib.version is 3.5.1
No, I do not have anything in matplotlibrc in my home directory or anywhere else.

I installed matplotlib 3.4.3 locally and got the same error with almost exactly the same difference (11.985321431153329), so I’m not sure what else it could be. Nonetheless, we’ll have a fix out for the next weekly.

The latest weekly installed without errors. Thanks for your help!