Build: #18 failed

Job: Test Tools MPI Many Linux 2.28 Rocky 8.10 Py3.10 failed

Stages & jobs

  1. Default Stage

  2. Test Tasks Stage

  3. Test Tools Stage

exceptions: Test case result

The below summarizes the result of the test " exceptions" in build 18 of CASA - CMake MPI - Test Tools MPI Many Linux 2.28 Rocky 8.10 Py3.10.
Description
exceptions
Test class
tests.tools.table.test_tool_table.table_getcellslice_test
Method
test_exceptions
Duration
< 1 sec
Status
Failed (New Failure)

Error Log

RuntimeError: Exception: File tmp.im exists, and the user does not want to remove it..
... thrown by static void casa::ImageFactory::_checkOutfile(const casacore::String&, casacore::Bool) at File: /source/casa6/casatools/src/code/imageanalysis/ImageAnalysis/ImageFactory2.cc, line: 594
self = <test_tool_table.table_getcellslice_test testMethod=test_exceptions>

    def test_exceptions(self):
        """Test various exception cases"""
>       self.ia.fromarray(self.myim, self.arr)

../../../casatools/tests/tools/table/test_tool_table.py:218: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../../../../venv/lib/python3.10/site-packages/casatools/image.py:391: in fromarray
    return self._swigobj.fromarray(outfile, pixels, csys, linear, overwrite, log, type)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <casatools.__casac__.image.image; proxy of <Swig Object of type 'casac::image *' at 0x7fc68b343870> >
args = ('tmp.im', array([[ 1,  2,  3,  4],
       [ 5,  6,  7,  8],
       [ 9, 12, 11, 12]]), {}, False, False, True, ...)
kwargs = {}

    def fromarray(self, *args, **kwargs):
        """
        fromarray(self, _outfile, _pixels, _csys, _linear, _overwrite, _log, _type) -> bool
    
    
    
        Summary:
            Construct a casa image from a numerical numpy array
    
        Description:
    
    
    
        This application converts a numerical numpy array of any size and dimensionality
        into a CASA image. It will create float, double, complex-float, and complex-double
        valued images.
    
        The image analysis tool on which this method is called will reference the created
        image; if this tool referenced another image before this call, that image will no
        longer be referenced by the tool after the creation of the new image. If you
        would rather have a new image analysis tool returned, keeping the one on which
        this method is called unaltered, use newimagefromarray() instead. If outfile is
        specified, a persistent image is written to disk, if not, the image tool on
        which this method was called will reference a temporary image (either in memory
        or on disk, depending on its size) that will be deleted when the tool is closed.
    
        The type parameter controls the data type/precision of the pixel values of the
        created image. 'f' indicates that float precision point (32 bit precision) pixel
        values should be writted. 'd' indicates that double precision (64 bit precision)
        pixel values should be written. If the input array has complex (as opposed to
        real) values, then complex pixel values, with each of the real and imaginary
        parts having the specified precision, will be written. Array values will be cast
        automatically to the specified precision, so that the precision of the input
        array values may be increased, decreased, or unchanged depending on the input
        array type.
    
        The coordinate system, provided as a a dictionary (use eg, cs.torecord() to do
        that), is optional. If specified, it must have the same number of dimensions
        as the pixels array. Call the naxes() method on the coordinate system tool to
        see how many dimensions the coordinate system has. A coordinate system can be
        created from scratch using the coordinate system (cs) tool and methods therein,
        but often users prefer to use a coordinate system from an already existing image.
        This can be gotten using ia.coordsys() which returns a coordinate system tool.
        A torecord() call on that tool will result in a python dictionary describing
        the coordinate system which is the necessary format for the csys input parameter
        of ia.fromarray().
    
        If csys is not specified, a default coordinate system will be created. If
        linear=False (the default), the created coordinate system will have standard
        RA/DEC/Stokes/Spectral Coordinate axes depending upon the shape of the pixels
        array (Stokes axis must be no longer than 4 pixels and the spectral axis may
        precede the Stokes axis if eg, shape=[64,64,32,4]. Extra dimensions are given
        linear coordinates.  If linear=True, then all the resulting coordinates
        are linear with the axes represent lengths. In this case each axis will have a
        value of 0.0 at its center pixel. The increment of each axis will be 1.0 km.
    
        The method returns True if creation of the image was successful, False otherwise,
        so a check can be made programmatically if the image creation was successful.
    
        Input Parameters:
            outfile                   Output image file name.  Default is unset.
            pixels                    Numeric array
            csys                      Coordinate System. Default is to construct an appropriate coordinate system given the array shape.
            linear                    Make a linear Coordinate System if csys not given
            overwrite                 Overwrite the output image if it already exists?
            log                       Write image creation messages to logger
            type                      Pixel data type to write. 'f' (float precision) or 'd' (double precision)
    
        Example:
    
    
        # make an image with a default RA/Dec/Stokes/Frequency coordinate system
        # having all pixels set to 2.5.
        ary = ia.makearray(v=2.5, shape=[64, 64, 4, 128])
        # the ia tool does not need to reference an image in this case (ie open()
        # need not have been called), if it does reference another image, that reference
        # will be lost and replaced with a reference to the newly created image.
        res = ia.fromarray(outfile='test.data', pixels=ary, overwrite=true)
        if res:
        # perform operations on the newly created image if desired and make sure
        # to close it when done to free up system resources (eg memory)
        ia.shape()
        ia.done()
    
    
    
    
    
        # create an image using the coordinate system from another image
        ia.open('myexistingimage.im')
    
        mycs = ia.coordsys()
        # the number of dimensions in the array and the coordinate system must
        # be the same. For this example to work, mycs.naxes() must return 4.
        ia.done()
        ary = ia.makearray(v=2.5, shape=[64, 64, 4, 128])
        res = ia.fromarray(pixels=ary, csys=mycs.torecord())
        mycs.done()
        if (res):
        # do things with the newly created temporary image before closing it
        ia.shape()
        ia.done()
    
    
    
        --------------------------------------------------------------------------------
    
        """
>       return _image.image_fromarray(self, *args, **kwargs)
E       RuntimeError: Exception: File tmp.im exists, and the user does not want to remove it..
E       ... thrown by static void casa::ImageFactory::_checkOutfile(const casacore::String&, casacore::Bool) at File: /source/casa6/casatools/src/code/imageanalysis/ImageAnalysis/ImageFactory2.cc, line: 594

../../../../venv/lib/python3.10/site-packages/casatools/__casac__/image.py:860: RuntimeError