Bug#1009457: python-imageio: FTBFS: dh_auto_test: error: pybuild --test --test-pytest -i python{version} -p "3.9 3.10" returned exit code 13

Lucas Nussbaum lucas at debian.org
Tue Apr 12 19:40:04 BST 2022


Source: python-imageio
Version: 2.4.1-4
Severity: serious
Justification: FTBFS
Tags: bookworm sid ftbfs
User: lucas at debian.org
Usertags: ftbfs-20220412 ftbfs-bookworm

Hi,

During a rebuild of all packages in sid, your package failed to build
on amd64.


Relevant part (hopefully):
> make[2]: Entering directory '/<<PKGBUILDDIR>>/docs'
> sphinx-build -b html -d _build/doctrees   . _build/html
> Running Sphinx v4.5.0
> Special preparations for imageio docs:
>   Prepare Format.Reader and Format.Writer for doc generation.
>   Prepare imageio.core for doc generation.
>   Create docs for creating plugins.
>   Create documentation for the formats.
>   Create documentation for imageio's standard images.
> making output directory... done
> [autosummary] generating autosummary for: cmdlinescripts.rst, devapi.rst, drop27.rst, envvariables.rst, examples.rst, format_avbin.rst, format_bmp-fi.rst, format_bmp-pil.rst, format_bsdf.rst, format_bufr-pil.rst, ..., index.rst, installation.rst, plugins.rst, releasenotes.rst, scipy.rst, sec_developer.rst, sec_gettingstarted.rst, sec_reference.rst, standardimages.rst, userapi.rst
> building [mo]: targets for 0 po files that are out of date
> building [html]: targets for 112 source files that are out of date
> updating environment: [new config] 112 added, 0 changed, 0 removed
> reading sources... [  0%] cmdlinescripts
> reading sources... [  1%] devapi
> reading sources... [  2%] drop27
> reading sources... [  3%] envvariables
> reading sources... [  4%] examples
> reading sources... [  5%] format_avbin
> reading sources... [  6%] format_bmp-fi
> reading sources... [  7%] format_bmp-pil
> reading sources... [  8%] format_bsdf
> reading sources... [  8%] format_bufr-pil
> reading sources... [  9%] format_clipboardgrab
> reading sources... [ 10%] format_cur-pil
> reading sources... [ 11%] format_cut-fi
> reading sources... [ 12%] format_dcx-pil
> reading sources... [ 13%] format_dds-fi
> reading sources... [ 14%] format_dds-pil
> reading sources... [ 15%] format_dib-pil
> reading sources... [ 16%] format_dicom
> reading sources... [ 16%] format_dummy
> reading sources... [ 17%] format_eps-pil
> reading sources... [ 18%] format_exr-fi
> reading sources... [ 19%] format_fei
> reading sources... [ 20%] format_ffmpeg
> reading sources... [ 21%] format_fits
> reading sources... [ 22%] format_fits-pil
> reading sources... [ 23%] format_fli-pil
> reading sources... [ 24%] format_fpx-pil
> reading sources... [ 25%] format_ftex-pil
> reading sources... [ 25%] format_g3-fi
> reading sources... [ 26%] format_gbr-pil
> reading sources... [ 27%] format_gdal
> reading sources... [ 28%] format_gif-fi
> reading sources... [ 29%] format_gif-pil
> reading sources... [ 30%] format_grib-pil
> reading sources... [ 31%] format_hdf5-pil
> reading sources... [ 32%] format_hdr-fi
> reading sources... [ 33%] format_icns-pil
> reading sources... [ 33%] format_ico-fi
> reading sources... [ 34%] format_ico-pil
> reading sources... [ 35%] format_iff-fi
> reading sources... [ 36%] format_im-pil
> reading sources... [ 37%] format_imt-pil
> reading sources... [ 38%] format_iptc-pil
> reading sources... [ 39%] format_itk
> reading sources... [ 40%] format_j2k-fi
> reading sources... [ 41%] format_jng-fi
> reading sources... [ 41%] format_jp2-fi
> reading sources... [ 42%] format_jpeg-fi
> reading sources... [ 43%] format_jpeg-pil
> reading sources... [ 44%] format_jpeg-xr-fi
> reading sources... [ 45%] format_jpeg2000-pil
> reading sources... [ 46%] format_koala-fi
> reading sources... [ 47%] format_lytro-f01-raw
> reading sources... [ 48%] format_lytro-illum-raw
> reading sources... [ 49%] format_lytro-lfp
> reading sources... [ 50%] format_lytro-lfr
> reading sources... [ 50%] format_mcidas-pil
> reading sources... [ 51%] format_mic-pil
> reading sources... [ 52%] format_mpo-pil
> reading sources... [ 53%] format_msp-pil
> reading sources... [ 54%] format_npz
> reading sources... [ 55%] format_pbm-fi
> reading sources... [ 56%] format_pbmraw-fi
> reading sources... [ 57%] format_pcd-fi
> reading sources... [ 58%] format_pcd-pil
> reading sources... [ 58%] format_pcx-fi
> reading sources... [ 59%] format_pcx-pil
> reading sources... [ 60%] format_pfm-fi
> reading sources... [ 61%] format_pgm-fi
> reading sources... [ 62%] format_pgmraw-fi
> reading sources... [ 63%] format_pict-fi
> reading sources... [ 64%] format_pixar-pil
> reading sources... [ 65%] format_png-fi
> reading sources... [ 66%] format_png-pil
> reading sources... [ 66%] format_ppm-fi
> reading sources... [ 67%] format_ppm-pil
> reading sources... [ 68%] format_ppmraw-fi
> reading sources... [ 69%] format_psd-fi
> reading sources... [ 70%] format_psd-pil
> reading sources... [ 71%] format_ras-fi
> reading sources... [ 72%] format_raw-fi
> reading sources... [ 73%] format_screengrab
> reading sources... [ 74%] format_sgi-fi
> reading sources... [ 75%] format_sgi-pil
> reading sources... [ 75%] format_spe
> reading sources... [ 76%] format_spider-pil
> reading sources... [ 77%] format_sun-pil
> reading sources... [ 78%] format_swf
> reading sources... [ 79%] format_targa-fi
> reading sources... [ 80%] format_tga-pil
> reading sources... [ 81%] format_tiff
> reading sources... [ 82%] format_tiff-fi
> reading sources... [ 83%] format_tiff-pil
> reading sources... [ 83%] format_wbmp-fi
> reading sources... [ 84%] format_webp-fi
> reading sources... [ 85%] format_wmf-pil
> reading sources... [ 86%] format_xbm-fi
> reading sources... [ 87%] format_xbm-pil
> reading sources... [ 88%] format_xpm-fi
> reading sources... [ 89%] format_xpm-pil
> reading sources... [ 90%] format_xvthumb-pil
> reading sources... [ 91%] formats
> reading sources... [ 91%] index
> reading sources... [ 92%] installation
> reading sources... [ 93%] plugins
> reading sources... [ 94%] releasenotes
> reading sources... [ 95%] scipy
> reading sources... [ 96%] sec_developer
> reading sources... [ 97%] sec_gettingstarted
> reading sources... [ 98%] sec_reference
> reading sources... [ 99%] standardimages
> reading sources... [100%] userapi
> 
> /<<PKGBUILDDIR>>/docs/format_wmf-pil.rst:41: WARNING: Literal block ends without a blank line; unexpected unindent.
> looking for now-outdated files... none found
> pickling environment... done
> checking consistency... /<<PKGBUILDDIR>>/docs/drop27.rst: WARNING: document isn't included in any toctree
> done
> preparing documents... done
> writing output... [  0%] cmdlinescripts
> writing output... [  1%] devapi
> writing output... [  2%] drop27
> writing output... [  3%] envvariables
> writing output... [  4%] examples
> writing output... [  5%] format_avbin
> writing output... [  6%] format_bmp-fi
> writing output... [  7%] format_bmp-pil
> writing output... [  8%] format_bsdf
> writing output... [  8%] format_bufr-pil
> writing output... [  9%] format_clipboardgrab
> writing output... [ 10%] format_cur-pil
> writing output... [ 11%] format_cut-fi
> writing output... [ 12%] format_dcx-pil
> writing output... [ 13%] format_dds-fi
> writing output... [ 14%] format_dds-pil
> writing output... [ 15%] format_dib-pil
> writing output... [ 16%] format_dicom
> writing output... [ 16%] format_dummy
> writing output... [ 17%] format_eps-pil
> writing output... [ 18%] format_exr-fi
> writing output... [ 19%] format_fei
> writing output... [ 20%] format_ffmpeg
> writing output... [ 21%] format_fits
> writing output... [ 22%] format_fits-pil
> writing output... [ 23%] format_fli-pil
> writing output... [ 24%] format_fpx-pil
> writing output... [ 25%] format_ftex-pil
> writing output... [ 25%] format_g3-fi
> writing output... [ 26%] format_gbr-pil
> writing output... [ 27%] format_gdal
> writing output... [ 28%] format_gif-fi
> writing output... [ 29%] format_gif-pil
> writing output... [ 30%] format_grib-pil
> writing output... [ 31%] format_hdf5-pil
> writing output... [ 32%] format_hdr-fi
> writing output... [ 33%] format_icns-pil
> writing output... [ 33%] format_ico-fi
> writing output... [ 34%] format_ico-pil
> writing output... [ 35%] format_iff-fi
> writing output... [ 36%] format_im-pil
> writing output... [ 37%] format_imt-pil
> writing output... [ 38%] format_iptc-pil
> writing output... [ 39%] format_itk
> writing output... [ 40%] format_j2k-fi
> writing output... [ 41%] format_jng-fi
> writing output... [ 41%] format_jp2-fi
> writing output... [ 42%] format_jpeg-fi
> writing output... [ 43%] format_jpeg-pil
> writing output... [ 44%] format_jpeg-xr-fi
> writing output... [ 45%] format_jpeg2000-pil
> writing output... [ 46%] format_koala-fi
> writing output... [ 47%] format_lytro-f01-raw
> writing output... [ 48%] format_lytro-illum-raw
> writing output... [ 49%] format_lytro-lfp
> writing output... [ 50%] format_lytro-lfr
> writing output... [ 50%] format_mcidas-pil
> writing output... [ 51%] format_mic-pil
> writing output... [ 52%] format_mpo-pil
> writing output... [ 53%] format_msp-pil
> writing output... [ 54%] format_npz
> writing output... [ 55%] format_pbm-fi
> writing output... [ 56%] format_pbmraw-fi
> writing output... [ 57%] format_pcd-fi
> writing output... [ 58%] format_pcd-pil
> writing output... [ 58%] format_pcx-fi
> writing output... [ 59%] format_pcx-pil
> writing output... [ 60%] format_pfm-fi
> writing output... [ 61%] format_pgm-fi
> writing output... [ 62%] format_pgmraw-fi
> writing output... [ 63%] format_pict-fi
> writing output... [ 64%] format_pixar-pil
> writing output... [ 65%] format_png-fi
> writing output... [ 66%] format_png-pil
> writing output... [ 66%] format_ppm-fi
> writing output... [ 67%] format_ppm-pil
> writing output... [ 68%] format_ppmraw-fi
> writing output... [ 69%] format_psd-fi
> writing output... [ 70%] format_psd-pil
> writing output... [ 71%] format_ras-fi
> writing output... [ 72%] format_raw-fi
> writing output... [ 73%] format_screengrab
> writing output... [ 74%] format_sgi-fi
> writing output... [ 75%] format_sgi-pil
> writing output... [ 75%] format_spe
> writing output... [ 76%] format_spider-pil
> writing output... [ 77%] format_sun-pil
> writing output... [ 78%] format_swf
> writing output... [ 79%] format_targa-fi
> writing output... [ 80%] format_tga-pil
> writing output... [ 81%] format_tiff
> writing output... [ 82%] format_tiff-fi
> writing output... [ 83%] format_tiff-pil
> writing output... [ 83%] format_wbmp-fi
> writing output... [ 84%] format_webp-fi
> writing output... [ 85%] format_wmf-pil
> writing output... [ 86%] format_xbm-fi
> writing output... [ 87%] format_xbm-pil
> writing output... [ 88%] format_xpm-fi
> writing output... [ 89%] format_xpm-pil
> writing output... [ 90%] format_xvthumb-pil
> writing output... [ 91%] formats
> writing output... [ 91%] index
> writing output... [ 92%] installation
> writing output... [ 93%] plugins
> writing output... [ 94%] releasenotes
> writing output... [ 95%] scipy
> writing output... [ 96%] sec_developer
> writing output... [ 97%] sec_gettingstarted
> writing output... [ 98%] sec_reference
> writing output... [ 99%] standardimages
> writing output... [100%] userapi
> 
> generating indices... genindex py-modindex done
> writing additional pages... search done
> copying static files... done
> copying extra files... done
> dumping search index in English (code: en)... done
> dumping object inventory... done
> build succeeded, 2 warnings.
> 
> The HTML pages are in _build/html.
> 
> Build finished. The HTML pages are in _build/html.
> make[2]: Leaving directory '/<<PKGBUILDDIR>>/docs'
> make[1]: Leaving directory '/<<PKGBUILDDIR>>'
>    dh_auto_test -O--buildsystem=pybuild
> I: pybuild base:239: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.9_imageio/build; python3.9 -m pytest tests
> ============================= test session starts ==============================
> platform linux -- Python 3.9.12, pytest-6.2.5, py-1.10.0, pluggy-1.0.0
> rootdir: /<<PKGBUILDDIR>>
> collected 124 items
> 
> tests/test_avbin.py .sssss                                               [  4%]
> tests/test_bin.py xxx                                                    [  7%]
> tests/test_bsdf.py s......s                                              [ 13%]
> tests/test_core.py sss..........F.                                       [ 25%]
> tests/test_dicom.py ..ssss                                               [ 30%]
> tests/test_fei_tiff.py s                                                 [ 31%]
> tests/test_ffmpeg.py ..sssssss...ssss                                    [ 44%]
> tests/test_ffmpeg_info.py ...s                                           [ 47%]
> tests/test_fits.py ss                                                    [ 49%]
> tests/test_format.py .........                                           [ 56%]
> tests/test_freeimage.py sssssssssssssss                                  [ 68%]
> tests/test_gdal.py s                                                     [ 69%]
> tests/test_grab.py ..                                                    [ 70%]
> tests/test_lytro.py ssssssss                                             [ 77%]
> tests/test_meta.py ....                                                  [ 80%]
> tests/test_npz.py ..                                                     [ 82%]
> tests/test_pillow.py .Fs.s.Fsss.                                         [ 91%]
> tests/test_simpleitk.py s                                                [ 91%]
> tests/test_spe.py .s                                                     [ 93%]
> tests/test_swf.py ssssss                                                 [ 98%]
> tests/test_tifffile.py .s                                                [100%]
> 
> =================================== FAILURES ===================================
> ________________________________ test_functions ________________________________
> 
>     def test_functions():
>         """ Test the user-facing API functions """
>     
>         # Test help(), it prints stuff, so we just check whether that goes ok
>         imageio.help()  # should print overview
>         imageio.help("PNG")  # should print about PNG
>     
>         fname1 = get_remote_file("images/chelsea.png", test_dir)
>         fname2 = fname1[:-3] + "jpg"
>         fname3 = fname1[:-3] + "notavalidext"
>         open(fname3, "wb")
>     
>         # Test read()
>         R1 = imageio.read(fname1)
>         R2 = imageio.read(fname1, "png")
>         assert R1.format is R2.format
>         # Fail
>         raises(ValueError, imageio.read, fname3)  # existing but not readable
>         raises(FileNotFoundError, imageio.read, "notexisting.barf")
>         raises(IndexError, imageio.read, fname1, "notexistingformat")
>     
>         # Test save()
>         W1 = imageio.save(fname2)
>         W2 = imageio.save(fname2, "JPG")
>         W1.close()
>         W2.close()
>         assert W1.format is W2.format
>         # Fail
>         raises(FileNotFoundError, imageio.save, "~/dirdoesnotexist/wtf.notexistingfile")
>     
>         # Test imread()
>         im1 = imageio.imread(fname1)
>         im2 = imageio.imread(fname1, "png")
>         assert im1.shape[2] == 3
>         assert np.all(im1 == im2)
>     
>         # Test imsave()
>         if os.path.isfile(fname2):
>             os.remove(fname2)
>         assert not os.path.isfile(fname2)
>         imageio.imsave(fname2, im1[:, :, 0])
>         imageio.imsave(fname2, im1)
>         assert os.path.isfile(fname2)
>     
>         # Test mimread()
>         fname3 = get_remote_file("images/newtonscradle.gif", test_dir)
> >       ims = imageio.mimread(fname3)
> 
> tests/test_core.py:483: 
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
> imageio/core/functions.py:295: in mimread
>     reader = read(uri, format, "I", **kwargs)
> imageio/core/functions.py:143: in get_reader
>     return format.get_reader(request)
> imageio/core/format.py:174: in get_reader
>     return self.Reader(self, request)
> imageio/core/format.py:224: in __init__
>     self._open(**self.request.kwargs.copy())
> imageio/plugins/pillowmulti.py:57: in _open
>     return PillowFormat.Reader._open(self)
> imageio/plugins/pillow.py:128: in _open
>     mode=pilmode, as_gray=as_gray, is_gray=_palette_is_grayscale(self._im)
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
> 
> pil_image = <PIL.GifImagePlugin.GifImageFile image mode=P size=200x150 at 0x7FE2E0EFBA00>
> 
>     def _palette_is_grayscale(pil_image):
>         if pil_image.mode != "P":
>             return False
>         # get palette as an array with R, G, B columns
> >       palette = np.asarray(pil_image.getpalette()).reshape((256, 3))
> E       ValueError: cannot reshape array of size 384 into shape (256,3)
> 
> imageio/plugins/pillow.py:519: ValueError
> ----------------------------- Captured stdout call -----------------------------
> TIFF - TIFF format [.tif, .tiff, .stk, .lsm]
> BMP-PIL - Windows Bitmap [.bmp]
> BUFR-PIL - BUFR [.bufr]
> CUR-PIL - Windows Cursor [.cur]
> DCX-PIL - Intel DCX [.dcx]
> DDS-PIL - DirectDraw Surface [.dds]
> DIB-PIL - Windows Bitmap []
> EPS-PIL - Encapsulated Postscript [.ps, .eps]
> FITS-PIL - FITS [.fit, .fits]
> FLI-PIL - Autodesk FLI/FLC Animation [.fli, .flc]
> FPX-PIL - FlashPix [.fpx]
> FTEX-PIL - Texture File Format (IW2:EOC) [.ftc, .ftu]
> GBR-PIL - GIMP brush file [.gbr]
> GIF-PIL - Static and animated gif (Pillow) [.gif]
> GRIB-PIL - GRIB [.grib]
> HDF5-PIL - HDF5 [.h5, .hdf]
> ICNS-PIL - Mac OS icns resource [.icns]
> ICO-PIL - Windows Icon [.ico]
> IM-PIL - IFUNC Image Memory [.im]
> IMT-PIL - IM Tools []
> IPTC-PIL - IPTC/NAA [.iim]
> JPEG-PIL - JPEG (ISO 10918) [.jfif, .jpe, .jpg, .jpeg]
> JPEG2000-PIL - JPEG 2000 (ISO 15444) [.jp2, .j2k, .jpc, .jpf, .jpx, .j2c]
> MCIDAS-PIL - McIdas area file []
> MIC-PIL - Microsoft Image Composer [.mic]
> MPO-PIL - MPO (CIPA DC-007) [.mpo]
> MSP-PIL - Windows Paint [.msp]
> PCD-PIL - Kodak PhotoCD [.pcd]
> PCX-PIL - Paintbrush [.pcx]
> PIXAR-PIL - PIXAR raster image [.pxr]
> PNG-PIL - Portable network graphics [.png]
> PPM-PIL - Pbmplus image [.pbm, .pgm, .ppm]
> PSD-PIL - Adobe Photoshop [.psd]
> SGI-PIL - SGI Image File Format [.bw, .rgb, .rgba, .sgi]
> SPIDER-PIL - Spider 2D image []
> SUN-PIL - Sun Raster File [.ras]
> TGA-PIL - Targa [.tga]
> TIFF-PIL - TIFF format (Pillow) [.tif, .tiff]
> WMF-PIL - Windows Metafile [.wmf, .emf]
> XBM-PIL - X11 Bitmap [.xbm]
> XPM-PIL - X11 Pixel Map [.xpm]
> XVTHUMB-PIL - XV thumbnail image []
> SCREENGRAB - Grab screenshots (Windows and OS X only) []
> CLIPBOARDGRAB - Grab from clipboard (Windows only) []
> BMP-FI - Windows or OS/2 Bitmap [.bmp]
> CUT-FI - Dr. Halo [.cut]
> DDS-FI - DirectX Surface [.dds]
> EXR-FI - ILM OpenEXR [.exr]
> G3-FI - Raw fax format CCITT G.3 [.g3]
> HDR-FI - High Dynamic Range Image [.hdr]
> IFF-FI - IFF Interleaved Bitmap [.iff, .lbm]
> J2K-FI - JPEG-2000 codestream [.j2k, .j2c]
> JNG-FI - JPEG Network Graphics [.jng]
> JP2-FI - JPEG-2000 File Format [.jp2]
> JPEG-FI - JPEG - JFIF Compliant [.jpg, .jif, .jpeg, .jpe]
> JPEG-XR-FI - JPEG XR image format [.jxr, .wdp, .hdp]
> KOALA-FI - C64 Koala Graphics [.koa]
> PBM-FI - Portable Bitmap (ASCII) [.pbm]
> PBMRAW-FI - Portable Bitmap (RAW) [.pbm]
> PCD-FI - Kodak PhotoCD [.pcd]
> PCX-FI - Zsoft Paintbrush [.pcx]
> PFM-FI - Portable floatmap [.pfm]
> PGM-FI - Portable Greymap (ASCII) [.pgm]
> PGMRAW-FI - Portable Greymap (RAW) [.pgm]
> PICT-FI - Macintosh PICT [.pct, .pict, .pic]
> PNG-FI - Portable Network Graphics [.png]
> PPM-FI - Portable Pixelmap (ASCII) [.ppm]
> PPMRAW-FI - Portable Pixelmap (RAW) [.ppm]
> PSD-FI - Adobe Photoshop [.psd]
> RAS-FI - Sun Raster Image [.ras]
> RAW-FI - RAW camera image [.3fr, .arw, .bay, .bmq, .cap, .cine, .cr2, .crw, .cs1, .dc2, .dcr, .drf, .dsc, .dng, .erf, .fff, .ia, .iiq, .k25, .kc2, .kdc, .mdc, .mef, .mos, .mrw, .nef, .nrw, .orf, .pef, .ptx, .pxn, .qtk, .raf, .raw, .rdc, .rw2, .rwl, .rwz, .sr2, .srf, .srw, .sti]
> SGI-FI - SGI Image Format [.sgi, .rgb, .rgba, .bw]
> TARGA-FI - Truevision Targa [.tga, .targa]
> TIFF-FI - Tagged Image File Format [.tif, .tiff]
> WBMP-FI - Wireless Bitmap [.wap, .wbmp, .wbm]
> WEBP-FI - Google WebP image format [.webp]
> XBM-FI - X11 Bitmap Format [.xbm]
> XPM-FI - X11 Pixmap Format [.xpm]
> ICO-FI - Windows icon [.ico]
> GIF-FI - Static and animated gif (FreeImage) [.gif]
> FFMPEG - Many video formats and cameras (via ffmpeg) [.mov, .avi, .mpg, .mpeg, .mp4, .mkv, .wmv]
> AVBIN - Many video formats (via AvBin, i.e. libav library) [.mov, .avi, .mp4, .mpg, .mpeg, .mkv]
> BSDF - Format based on the Binary Structured Data Format [.bsdf]
> DICOM - Digital Imaging and Communications in Medicine [.dcm, .ct, .mri]
> NPZ - Numpy's compressed array format [.npz]
> SWF - Shockwave flash [.swf]
> FEI - FEI-SEM TIFF format [.tif, .tiff]
> FITS - Flexible Image Transport System (FITS) format [.fits, .fit, .fts]
> ITK - Insight Segmentation and Registration Toolkit (ITK) format [.gipl, .ipl, .mha, .mhd, .nhdr, .nii, .nrrd, .vtk, .bmp, .jpeg, .jpg, .png, .tiff, .tif, .dicom, .gdcm]
> GDAL - Geospatial Data Abstraction Library [.tiff, .tif, .img, .ecw, .jpg, .jpeg]
> LYTRO-LFR - Lytro Illum lfr image file [.lfr]
> LYTRO-ILLUM-RAW - Lytro Illum raw image file [.raw]
> LYTRO-LFP - Lytro F01 lfp image file [.lfp]
> LYTRO-F01-RAW - Lytro F01 raw image file [.raw]
> SPE - SPE file format [.spe]
> DUMMY - An example format that does nothing. [.foobar, .nonexistentext]
> PNG-PIL - Portable network graphics
> 
>     A PNG format based on Pillow.
>     
>     This format supports grayscale, RGB and RGBA images.
>     
>     Parameters for reading
>     ----------------------
>     ignoregamma : bool
>         Avoid gamma correction. Default True.
>     pilmode : str
>         From the Pillow documentation:
>         
>         * 'L' (8-bit pixels, grayscale)
>         * 'P' (8-bit pixels, mapped to any other mode using a color palette)
>         * 'RGB' (3x8-bit pixels, true color)
>         * 'RGBA' (4x8-bit pixels, true color with transparency mask)
>         * 'CMYK' (4x8-bit pixels, color separation)
>         * 'YCbCr' (3x8-bit pixels, color video format)
>         * 'I' (32-bit signed integer pixels)
>         * 'F' (32-bit floating point pixels)
>         
>         PIL also provides limited support for a few special modes, including
>         'LA' ('L' with alpha), 'RGBX' (true color with padding) and 'RGBa'
>         (true color with premultiplied alpha).
>         
>         When translating a color image to grayscale (mode 'L', 'I' or 'F'),
>         the library uses the ITU-R 601-2 luma transform::
>         
>             L = R * 299/1000 + G * 587/1000 + B * 114/1000
>     as_gray : bool
>         If True, the image is converted using mode 'F'. When `mode` is
>         not None and `as_gray` is True, the image is first converted
>         according to `mode`, and the result is then "flattened" using
>         mode 'F'.
>     
>     Parameters for saving
>     ---------------------
>     optimize : bool
>         If present and true, instructs the PNG writer to make the output file
>         as small as possible. This includes extra processing in order to find
>         optimal encoder settings.
>     transparency: 
>         This option controls what color image to mark as transparent.
>     dpi: tuple of two scalars
>         The desired dpi in each direction.
>     pnginfo: PIL.PngImagePlugin.PngInfo
>         Object containing text tags.
>     compress_level: int
>         ZLIB compression level, a number between 0 and 9: 1 gives best speed,
>         9 gives best compression, 0 gives no compression at all. Default is 9.
>         When ``optimize`` option is True ``compress_level`` has no effect
>         (it is set to 9 regardless of a value passed).
>     compression: int
>         Compatibility with the freeimage PNG format. If given, it overrides
>         compress_level.
>     icc_profile:
>         The ICC Profile to include in the saved file.
>     bits (experimental): int
>         This option controls how many bits to store. If omitted,
>         the PNG writer uses 8 bits (256 colors).
>     quantize: 
>         Compatibility with the freeimage PNG format. If given, it overrides
>         bits. In this case, given as a number between 1-256.
>     dictionary (experimental): dict
>         Set the ZLIB encoder dictionary.
> 
> ___________________________________ test_png ___________________________________
> 
>     def test_png():
>     
>         for isfloat in (False, True):
>             for crop in (0, 1, 2):
>                 for colors in (0, 1, 3, 4):
>                     fname = fnamebase + "%i.%i.%i.png" % (isfloat, crop, colors)
>                     rim = get_ref_im(colors, crop, isfloat)
>                     imageio.imsave(fname, rim)
>                     im = imageio.imread(fname)
>                     mul = 255 if isfloat else 1
>                     assert_close(rim * mul, im, 0.1)  # lossless
>     
>         # Parameters
>         im = imageio.imread("imageio:chelsea.png", ignoregamma=True)
>         imageio.imsave(fnamebase + ".png", im, interlaced=True)
>     
>         # Parameter fail
>         raises(TypeError, imageio.imread, "imageio:chelsea.png", notavalidk=True)
>         raises(TypeError, imageio.imsave, fnamebase + ".png", im, notavalidk=True)
>     
>         # Compression
>         imageio.imsave(fnamebase + "1.png", im, compression=0)
>         imageio.imsave(fnamebase + "2.png", im, compression=9)
>         s1 = os.stat(fnamebase + "1.png").st_size
>         s2 = os.stat(fnamebase + "2.png").st_size
>         assert s2 < s1
>         # Fail
>         raises(ValueError, imageio.imsave, fnamebase + ".png", im, compression=12)
>     
>         # Quantize
>         imageio.imsave(fnamebase + "1.png", im, quantize=256)
>         imageio.imsave(fnamebase + "2.png", im, quantize=4)
>     
> >       im = imageio.imread(fnamebase + "2.png")  # touch palette read code
> 
> tests/test_pillow.py:132: 
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
> imageio/core/functions.py:221: in imread
>     reader = read(uri, format, "i", **kwargs)
> imageio/core/functions.py:143: in get_reader
>     return format.get_reader(request)
> imageio/core/format.py:174: in get_reader
>     return self.Reader(self, request)
> imageio/core/format.py:224: in __init__
>     self._open(**self.request.kwargs.copy())
> imageio/plugins/pillow.py:276: in _open
>     return PillowFormat.Reader._open(self, pilmode=pilmode, as_gray=as_gray)
> imageio/plugins/pillow.py:128: in _open
>     mode=pilmode, as_gray=as_gray, is_gray=_palette_is_grayscale(self._im)
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
> 
> pil_image = <PIL.PngImagePlugin.PngImageFile image mode=P size=451x300 at 0x7FE2E0E80610>
> 
>     def _palette_is_grayscale(pil_image):
>         if pil_image.mode != "P":
>             return False
>         # get palette as an array with R, G, B columns
> >       palette = np.asarray(pil_image.getpalette()).reshape((256, 3))
> E       ValueError: cannot reshape array of size 12 into shape (256,3)
> 
> imageio/plugins/pillow.py:519: ValueError
> ------------------------------ Captured log call -------------------------------
> WARNING  root:util.py:61 Lossy conversion from float32 to uint8. Range [0, 1]. Convert image to uint8 prior to saving to suppress this warning.
> WARNING  root:util.py:61 Lossy conversion from float32 to uint8. Range [0, 1]. Convert image to uint8 prior to saving to suppress this warning.
> WARNING  root:util.py:61 Lossy conversion from float32 to uint8. Range [0, 1]. Convert image to uint8 prior to saving to suppress this warning.
> WARNING  root:util.py:61 Lossy conversion from float32 to uint8. Range [0, 1]. Convert image to uint8 prior to saving to suppress this warning.
> WARNING  root:util.py:61 Lossy conversion from float32 to uint8. Range [0, 1]. Convert image to uint8 prior to saving to suppress this warning.
> WARNING  root:util.py:61 Lossy conversion from float32 to uint8. Range [0, 1]. Convert image to uint8 prior to saving to suppress this warning.
> WARNING  root:util.py:61 Lossy conversion from float32 to uint8. Range [0, 1]. Convert image to uint8 prior to saving to suppress this warning.
> WARNING  root:util.py:61 Lossy conversion from float32 to uint8. Range [0, 1]. Convert image to uint8 prior to saving to suppress this warning.
> WARNING  root:util.py:61 Lossy conversion from float32 to uint8. Range [0, 1]. Convert image to uint8 prior to saving to suppress this warning.
> WARNING  root:util.py:61 Lossy conversion from float32 to uint8. Range [0, 1]. Convert image to uint8 prior to saving to suppress this warning.
> WARNING  root:util.py:61 Lossy conversion from float32 to uint8. Range [0, 1]. Convert image to uint8 prior to saving to suppress this warning.
> WARNING  root:util.py:61 Lossy conversion from float32 to uint8. Range [0, 1]. Convert image to uint8 prior to saving to suppress this warning.
> ______________________________ test_animated_gif _______________________________
> 
>     def test_animated_gif():
>     
>         # Read newton's cradle
> >       ims = imageio.mimread("imageio:newtonscradle.gif")
> 
> tests/test_pillow.py:253: 
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
> imageio/core/functions.py:295: in mimread
>     reader = read(uri, format, "I", **kwargs)
> imageio/core/functions.py:143: in get_reader
>     return format.get_reader(request)
> imageio/core/format.py:174: in get_reader
>     return self.Reader(self, request)
> imageio/core/format.py:224: in __init__
>     self._open(**self.request.kwargs.copy())
> imageio/plugins/pillowmulti.py:57: in _open
>     return PillowFormat.Reader._open(self)
> imageio/plugins/pillow.py:128: in _open
>     mode=pilmode, as_gray=as_gray, is_gray=_palette_is_grayscale(self._im)
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
> 
> pil_image = <PIL.GifImagePlugin.GifImageFile image mode=P size=200x150 at 0x7FE2E2C2FD30>
> 
>     def _palette_is_grayscale(pil_image):
>         if pil_image.mode != "P":
>             return False
>         # get palette as an array with R, G, B columns
> >       palette = np.asarray(pil_image.getpalette()).reshape((256, 3))
> E       ValueError: cannot reshape array of size 384 into shape (256,3)
> 
> imageio/plugins/pillow.py:519: ValueError
> =============================== warnings summary ===============================
> imageio/plugins/ffmpeg.py:1059
>   /<<PKGBUILDDIR>>/.pybuild/cpython3_3.9_imageio/build/imageio/plugins/ffmpeg.py:1059: DeprecationWarning: invalid escape sequence \.
>     matches = re.findall(" ([0-9]+\.?[0-9]*) (tbr|fps)", line)
> 
> .pybuild/cpython3_3.9_imageio/build/tests/test_bsdf.py: 12 warnings
>   /<<PKGBUILDDIR>>/.pybuild/cpython3_3.9_imageio/build/imageio/plugins/_bsdf.py:418: DeprecationWarning: The 'warn' method is deprecated, use 'warning' instead
>     logger.warn("BSDF warning: no extension found for %r" % ext_id)
> 
> .pybuild/cpython3_3.9_imageio/build/tests/test_core.py: 4 warnings
> .pybuild/cpython3_3.9_imageio/build/tests/test_dicom.py: 2 warnings
> .pybuild/cpython3_3.9_imageio/build/tests/test_format.py: 4 warnings
> .pybuild/cpython3_3.9_imageio/build/tests/test_grab.py: 2 warnings
>   /<<PKGBUILDDIR>>/.pybuild/cpython3_3.9_imageio/build/imageio/core/util.py:562: DeprecationWarning: Deprecated since Python 3.4. Use importlib.util.find_spec() instead.
>     return importlib.find_loader(module_name) is not None
> 
> .pybuild/cpython3_3.9_imageio/build/tests/test_pillow.py::test_png
>   /<<PKGBUILDDIR>>/.pybuild/cpython3_3.9_imageio/build/imageio/plugins/pillow.py:317: UserWarning: PIL PNG writer cannot produce interlaced images.
>     warn("PIL PNG writer cannot produce interlaced images.")
> 
> -- Docs: https://docs.pytest.org/en/stable/warnings.html
> =========================== short test summary info ============================
> FAILED tests/test_core.py::test_functions - ValueError: cannot reshape array ...
> FAILED tests/test_pillow.py::test_png - ValueError: cannot reshape array of s...
> FAILED tests/test_pillow.py::test_animated_gif - ValueError: cannot reshape a...
> ====== 3 failed, 51 passed, 67 skipped, 3 xfailed, 26 warnings in 19.46s =======
> E: pybuild pybuild:369: test: plugin distutils failed with: exit code=1: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.9_imageio/build; python3.9 -m pytest tests
> I: pybuild base:239: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.10_imageio/build; python3.10 -m pytest tests
> ============================= test session starts ==============================
> platform linux -- Python 3.10.4, pytest-6.2.5, py-1.10.0, pluggy-1.0.0
> rootdir: /<<PKGBUILDDIR>>
> collected 124 items
> 
> tests/test_avbin.py .sssss                                               [  4%]
> tests/test_bin.py xxx                                                    [  7%]
> tests/test_bsdf.py s......s                                              [ 13%]
> tests/test_core.py sss..........F.                                       [ 25%]
> tests/test_dicom.py ..ssss                                               [ 30%]
> tests/test_fei_tiff.py s                                                 [ 31%]
> tests/test_ffmpeg.py ..sssssss...ssss                                    [ 44%]
> tests/test_ffmpeg_info.py ...s                                           [ 47%]
> tests/test_fits.py ss                                                    [ 49%]
> tests/test_format.py .........                                           [ 56%]
> tests/test_freeimage.py sssssssssssssss                                  [ 68%]
> tests/test_gdal.py s                                                     [ 69%]
> tests/test_grab.py ..                                                    [ 70%]
> tests/test_lytro.py ssssssss                                             [ 77%]
> tests/test_meta.py ....                                                  [ 80%]
> tests/test_npz.py ..                                                     [ 82%]
> tests/test_pillow.py .Fs.s.Fsss.                                         [ 91%]
> tests/test_simpleitk.py s                                                [ 91%]
> tests/test_spe.py .s                                                     [ 93%]
> tests/test_swf.py ssssss                                                 [ 98%]
> tests/test_tifffile.py .s                                                [100%]
> 
> =================================== FAILURES ===================================
> ________________________________ test_functions ________________________________
> 
>     def test_functions():
>         """ Test the user-facing API functions """
>     
>         # Test help(), it prints stuff, so we just check whether that goes ok
>         imageio.help()  # should print overview
>         imageio.help("PNG")  # should print about PNG
>     
>         fname1 = get_remote_file("images/chelsea.png", test_dir)
>         fname2 = fname1[:-3] + "jpg"
>         fname3 = fname1[:-3] + "notavalidext"
>         open(fname3, "wb")
>     
>         # Test read()
>         R1 = imageio.read(fname1)
>         R2 = imageio.read(fname1, "png")
>         assert R1.format is R2.format
>         # Fail
>         raises(ValueError, imageio.read, fname3)  # existing but not readable
>         raises(FileNotFoundError, imageio.read, "notexisting.barf")
>         raises(IndexError, imageio.read, fname1, "notexistingformat")
>     
>         # Test save()
>         W1 = imageio.save(fname2)
>         W2 = imageio.save(fname2, "JPG")
>         W1.close()
>         W2.close()
>         assert W1.format is W2.format
>         # Fail
>         raises(FileNotFoundError, imageio.save, "~/dirdoesnotexist/wtf.notexistingfile")
>     
>         # Test imread()
>         im1 = imageio.imread(fname1)
>         im2 = imageio.imread(fname1, "png")
>         assert im1.shape[2] == 3
>         assert np.all(im1 == im2)
>     
>         # Test imsave()
>         if os.path.isfile(fname2):
>             os.remove(fname2)
>         assert not os.path.isfile(fname2)
>         imageio.imsave(fname2, im1[:, :, 0])
>         imageio.imsave(fname2, im1)
>         assert os.path.isfile(fname2)
>     
>         # Test mimread()
>         fname3 = get_remote_file("images/newtonscradle.gif", test_dir)
> >       ims = imageio.mimread(fname3)
> 
> tests/test_core.py:483: 
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
> imageio/core/functions.py:295: in mimread
>     reader = read(uri, format, "I", **kwargs)
> imageio/core/functions.py:143: in get_reader
>     return format.get_reader(request)
> imageio/core/format.py:174: in get_reader
>     return self.Reader(self, request)
> imageio/core/format.py:224: in __init__
>     self._open(**self.request.kwargs.copy())
> imageio/plugins/pillowmulti.py:57: in _open
>     return PillowFormat.Reader._open(self)
> imageio/plugins/pillow.py:128: in _open
>     mode=pilmode, as_gray=as_gray, is_gray=_palette_is_grayscale(self._im)
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
> 
> pil_image = <PIL.GifImagePlugin.GifImageFile image mode=P size=200x150 at 0x7FE9AC3D7C10>
> 
>     def _palette_is_grayscale(pil_image):
>         if pil_image.mode != "P":
>             return False
>         # get palette as an array with R, G, B columns
> >       palette = np.asarray(pil_image.getpalette()).reshape((256, 3))
> E       ValueError: cannot reshape array of size 384 into shape (256,3)
> 
> imageio/plugins/pillow.py:519: ValueError
> ----------------------------- Captured stdout call -----------------------------
> TIFF - TIFF format [.tif, .tiff, .stk, .lsm]
> BMP-PIL - Windows Bitmap [.bmp]
> BUFR-PIL - BUFR [.bufr]
> CUR-PIL - Windows Cursor [.cur]
> DCX-PIL - Intel DCX [.dcx]
> DDS-PIL - DirectDraw Surface [.dds]
> DIB-PIL - Windows Bitmap []
> EPS-PIL - Encapsulated Postscript [.ps, .eps]
> FITS-PIL - FITS [.fit, .fits]
> FLI-PIL - Autodesk FLI/FLC Animation [.fli, .flc]
> FPX-PIL - FlashPix [.fpx]
> FTEX-PIL - Texture File Format (IW2:EOC) [.ftc, .ftu]
> GBR-PIL - GIMP brush file [.gbr]
> GIF-PIL - Static and animated gif (Pillow) [.gif]
> GRIB-PIL - GRIB [.grib]
> HDF5-PIL - HDF5 [.h5, .hdf]
> ICNS-PIL - Mac OS icns resource [.icns]
> ICO-PIL - Windows Icon [.ico]
> IM-PIL - IFUNC Image Memory [.im]
> IMT-PIL - IM Tools []
> IPTC-PIL - IPTC/NAA [.iim]
> JPEG-PIL - JPEG (ISO 10918) [.jfif, .jpe, .jpg, .jpeg]
> JPEG2000-PIL - JPEG 2000 (ISO 15444) [.jp2, .j2k, .jpc, .jpf, .jpx, .j2c]
> MCIDAS-PIL - McIdas area file []
> MIC-PIL - Microsoft Image Composer [.mic]
> MPO-PIL - MPO (CIPA DC-007) [.mpo]
> MSP-PIL - Windows Paint [.msp]
> PCD-PIL - Kodak PhotoCD [.pcd]
> PCX-PIL - Paintbrush [.pcx]
> PIXAR-PIL - PIXAR raster image [.pxr]
> PNG-PIL - Portable network graphics [.png]
> PPM-PIL - Pbmplus image [.pbm, .pgm, .ppm]
> PSD-PIL - Adobe Photoshop [.psd]
> SGI-PIL - SGI Image File Format [.bw, .rgb, .rgba, .sgi]
> SPIDER-PIL - Spider 2D image []
> SUN-PIL - Sun Raster File [.ras]
> TGA-PIL - Targa [.tga]
> TIFF-PIL - TIFF format (Pillow) [.tif, .tiff]
> WMF-PIL - Windows Metafile [.wmf, .emf]
> XBM-PIL - X11 Bitmap [.xbm]
> XPM-PIL - X11 Pixel Map [.xpm]
> XVTHUMB-PIL - XV thumbnail image []
> SCREENGRAB - Grab screenshots (Windows and OS X only) []
> CLIPBOARDGRAB - Grab from clipboard (Windows only) []
> BMP-FI - Windows or OS/2 Bitmap [.bmp]
> CUT-FI - Dr. Halo [.cut]
> DDS-FI - DirectX Surface [.dds]
> EXR-FI - ILM OpenEXR [.exr]
> G3-FI - Raw fax format CCITT G.3 [.g3]
> HDR-FI - High Dynamic Range Image [.hdr]
> IFF-FI - IFF Interleaved Bitmap [.iff, .lbm]
> J2K-FI - JPEG-2000 codestream [.j2k, .j2c]
> JNG-FI - JPEG Network Graphics [.jng]
> JP2-FI - JPEG-2000 File Format [.jp2]
> JPEG-FI - JPEG - JFIF Compliant [.jpg, .jif, .jpeg, .jpe]
> JPEG-XR-FI - JPEG XR image format [.jxr, .wdp, .hdp]
> KOALA-FI - C64 Koala Graphics [.koa]
> PBM-FI - Portable Bitmap (ASCII) [.pbm]
> PBMRAW-FI - Portable Bitmap (RAW) [.pbm]
> PCD-FI - Kodak PhotoCD [.pcd]
> PCX-FI - Zsoft Paintbrush [.pcx]
> PFM-FI - Portable floatmap [.pfm]
> PGM-FI - Portable Greymap (ASCII) [.pgm]
> PGMRAW-FI - Portable Greymap (RAW) [.pgm]
> PICT-FI - Macintosh PICT [.pct, .pict, .pic]
> PNG-FI - Portable Network Graphics [.png]
> PPM-FI - Portable Pixelmap (ASCII) [.ppm]
> PPMRAW-FI - Portable Pixelmap (RAW) [.ppm]
> PSD-FI - Adobe Photoshop [.psd]
> RAS-FI - Sun Raster Image [.ras]
> RAW-FI - RAW camera image [.3fr, .arw, .bay, .bmq, .cap, .cine, .cr2, .crw, .cs1, .dc2, .dcr, .drf, .dsc, .dng, .erf, .fff, .ia, .iiq, .k25, .kc2, .kdc, .mdc, .mef, .mos, .mrw, .nef, .nrw, .orf, .pef, .ptx, .pxn, .qtk, .raf, .raw, .rdc, .rw2, .rwl, .rwz, .sr2, .srf, .srw, .sti]
> SGI-FI - SGI Image Format [.sgi, .rgb, .rgba, .bw]
> TARGA-FI - Truevision Targa [.tga, .targa]
> TIFF-FI - Tagged Image File Format [.tif, .tiff]
> WBMP-FI - Wireless Bitmap [.wap, .wbmp, .wbm]
> WEBP-FI - Google WebP image format [.webp]
> XBM-FI - X11 Bitmap Format [.xbm]
> XPM-FI - X11 Pixmap Format [.xpm]
> ICO-FI - Windows icon [.ico]
> GIF-FI - Static and animated gif (FreeImage) [.gif]
> FFMPEG - Many video formats and cameras (via ffmpeg) [.mov, .avi, .mpg, .mpeg, .mp4, .mkv, .wmv]
> AVBIN - Many video formats (via AvBin, i.e. libav library) [.mov, .avi, .mp4, .mpg, .mpeg, .mkv]
> BSDF - Format based on the Binary Structured Data Format [.bsdf]
> DICOM - Digital Imaging and Communications in Medicine [.dcm, .ct, .mri]
> NPZ - Numpy's compressed array format [.npz]
> SWF - Shockwave flash [.swf]
> FEI - FEI-SEM TIFF format [.tif, .tiff]
> FITS - Flexible Image Transport System (FITS) format [.fits, .fit, .fts]
> ITK - Insight Segmentation and Registration Toolkit (ITK) format [.gipl, .ipl, .mha, .mhd, .nhdr, .nii, .nrrd, .vtk, .bmp, .jpeg, .jpg, .png, .tiff, .tif, .dicom, .gdcm]
> GDAL - Geospatial Data Abstraction Library [.tiff, .tif, .img, .ecw, .jpg, .jpeg]
> LYTRO-LFR - Lytro Illum lfr image file [.lfr]
> LYTRO-ILLUM-RAW - Lytro Illum raw image file [.raw]
> LYTRO-LFP - Lytro F01 lfp image file [.lfp]
> LYTRO-F01-RAW - Lytro F01 raw image file [.raw]
> SPE - SPE file format [.spe]
> DUMMY - An example format that does nothing. [.foobar, .nonexistentext]
> PNG-PIL - Portable network graphics
> 
>     A PNG format based on Pillow.
>     
>     This format supports grayscale, RGB and RGBA images.
>     
>     Parameters for reading
>     ----------------------
>     ignoregamma : bool
>         Avoid gamma correction. Default True.
>     pilmode : str
>         From the Pillow documentation:
>         
>         * 'L' (8-bit pixels, grayscale)
>         * 'P' (8-bit pixels, mapped to any other mode using a color palette)
>         * 'RGB' (3x8-bit pixels, true color)
>         * 'RGBA' (4x8-bit pixels, true color with transparency mask)
>         * 'CMYK' (4x8-bit pixels, color separation)
>         * 'YCbCr' (3x8-bit pixels, color video format)
>         * 'I' (32-bit signed integer pixels)
>         * 'F' (32-bit floating point pixels)
>         
>         PIL also provides limited support for a few special modes, including
>         'LA' ('L' with alpha), 'RGBX' (true color with padding) and 'RGBa'
>         (true color with premultiplied alpha).
>         
>         When translating a color image to grayscale (mode 'L', 'I' or 'F'),
>         the library uses the ITU-R 601-2 luma transform::
>         
>             L = R * 299/1000 + G * 587/1000 + B * 114/1000
>     as_gray : bool
>         If True, the image is converted using mode 'F'. When `mode` is
>         not None and `as_gray` is True, the image is first converted
>         according to `mode`, and the result is then "flattened" using
>         mode 'F'.
>     
>     Parameters for saving
>     ---------------------
>     optimize : bool
>         If present and true, instructs the PNG writer to make the output file
>         as small as possible. This includes extra processing in order to find
>         optimal encoder settings.
>     transparency: 
>         This option controls what color image to mark as transparent.
>     dpi: tuple of two scalars
>         The desired dpi in each direction.
>     pnginfo: PIL.PngImagePlugin.PngInfo
>         Object containing text tags.
>     compress_level: int
>         ZLIB compression level, a number between 0 and 9: 1 gives best speed,
>         9 gives best compression, 0 gives no compression at all. Default is 9.
>         When ``optimize`` option is True ``compress_level`` has no effect
>         (it is set to 9 regardless of a value passed).
>     compression: int
>         Compatibility with the freeimage PNG format. If given, it overrides
>         compress_level.
>     icc_profile:
>         The ICC Profile to include in the saved file.
>     bits (experimental): int
>         This option controls how many bits to store. If omitted,
>         the PNG writer uses 8 bits (256 colors).
>     quantize: 
>         Compatibility with the freeimage PNG format. If given, it overrides
>         bits. In this case, given as a number between 1-256.
>     dictionary (experimental): dict
>         Set the ZLIB encoder dictionary.
> 
> ___________________________________ test_png ___________________________________
> 
>     def test_png():
>     
>         for isfloat in (False, True):
>             for crop in (0, 1, 2):
>                 for colors in (0, 1, 3, 4):
>                     fname = fnamebase + "%i.%i.%i.png" % (isfloat, crop, colors)
>                     rim = get_ref_im(colors, crop, isfloat)
>                     imageio.imsave(fname, rim)
>                     im = imageio.imread(fname)
>                     mul = 255 if isfloat else 1
>                     assert_close(rim * mul, im, 0.1)  # lossless
>     
>         # Parameters
>         im = imageio.imread("imageio:chelsea.png", ignoregamma=True)
>         imageio.imsave(fnamebase + ".png", im, interlaced=True)
>     
>         # Parameter fail
>         raises(TypeError, imageio.imread, "imageio:chelsea.png", notavalidk=True)
>         raises(TypeError, imageio.imsave, fnamebase + ".png", im, notavalidk=True)
>     
>         # Compression
>         imageio.imsave(fnamebase + "1.png", im, compression=0)
>         imageio.imsave(fnamebase + "2.png", im, compression=9)
>         s1 = os.stat(fnamebase + "1.png").st_size
>         s2 = os.stat(fnamebase + "2.png").st_size
>         assert s2 < s1
>         # Fail
>         raises(ValueError, imageio.imsave, fnamebase + ".png", im, compression=12)
>     
>         # Quantize
>         imageio.imsave(fnamebase + "1.png", im, quantize=256)
>         imageio.imsave(fnamebase + "2.png", im, quantize=4)
>     
> >       im = imageio.imread(fnamebase + "2.png")  # touch palette read code
> 
> tests/test_pillow.py:132: 
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
> imageio/core/functions.py:221: in imread
>     reader = read(uri, format, "i", **kwargs)
> imageio/core/functions.py:143: in get_reader
>     return format.get_reader(request)
> imageio/core/format.py:174: in get_reader
>     return self.Reader(self, request)
> imageio/core/format.py:224: in __init__
>     self._open(**self.request.kwargs.copy())
> imageio/plugins/pillow.py:276: in _open
>     return PillowFormat.Reader._open(self, pilmode=pilmode, as_gray=as_gray)
> imageio/plugins/pillow.py:128: in _open
>     mode=pilmode, as_gray=as_gray, is_gray=_palette_is_grayscale(self._im)
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
> 
> pil_image = <PIL.PngImagePlugin.PngImageFile image mode=P size=451x300 at 0x7FE9AC454AF0>
> 
>     def _palette_is_grayscale(pil_image):
>         if pil_image.mode != "P":
>             return False
>         # get palette as an array with R, G, B columns
> >       palette = np.asarray(pil_image.getpalette()).reshape((256, 3))
> E       ValueError: cannot reshape array of size 12 into shape (256,3)
> 
> imageio/plugins/pillow.py:519: ValueError
> ------------------------------ Captured log call -------------------------------
> WARNING  root:util.py:61 Lossy conversion from float32 to uint8. Range [0, 1]. Convert image to uint8 prior to saving to suppress this warning.
> WARNING  root:util.py:61 Lossy conversion from float32 to uint8. Range [0, 1]. Convert image to uint8 prior to saving to suppress this warning.
> WARNING  root:util.py:61 Lossy conversion from float32 to uint8. Range [0, 1]. Convert image to uint8 prior to saving to suppress this warning.
> WARNING  root:util.py:61 Lossy conversion from float32 to uint8. Range [0, 1]. Convert image to uint8 prior to saving to suppress this warning.
> WARNING  root:util.py:61 Lossy conversion from float32 to uint8. Range [0, 1]. Convert image to uint8 prior to saving to suppress this warning.
> WARNING  root:util.py:61 Lossy conversion from float32 to uint8. Range [0, 1]. Convert image to uint8 prior to saving to suppress this warning.
> WARNING  root:util.py:61 Lossy conversion from float32 to uint8. Range [0, 1]. Convert image to uint8 prior to saving to suppress this warning.
> WARNING  root:util.py:61 Lossy conversion from float32 to uint8. Range [0, 1]. Convert image to uint8 prior to saving to suppress this warning.
> WARNING  root:util.py:61 Lossy conversion from float32 to uint8. Range [0, 1]. Convert image to uint8 prior to saving to suppress this warning.
> WARNING  root:util.py:61 Lossy conversion from float32 to uint8. Range [0, 1]. Convert image to uint8 prior to saving to suppress this warning.
> WARNING  root:util.py:61 Lossy conversion from float32 to uint8. Range [0, 1]. Convert image to uint8 prior to saving to suppress this warning.
> WARNING  root:util.py:61 Lossy conversion from float32 to uint8. Range [0, 1]. Convert image to uint8 prior to saving to suppress this warning.
> ______________________________ test_animated_gif _______________________________
> 
>     def test_animated_gif():
>     
>         # Read newton's cradle
> >       ims = imageio.mimread("imageio:newtonscradle.gif")
> 
> tests/test_pillow.py:253: 
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
> imageio/core/functions.py:295: in mimread
>     reader = read(uri, format, "I", **kwargs)
> imageio/core/functions.py:143: in get_reader
>     return format.get_reader(request)
> imageio/core/format.py:174: in get_reader
>     return self.Reader(self, request)
> imageio/core/format.py:224: in __init__
>     self._open(**self.request.kwargs.copy())
> imageio/plugins/pillowmulti.py:57: in _open
>     return PillowFormat.Reader._open(self)
> imageio/plugins/pillow.py:128: in _open
>     mode=pilmode, as_gray=as_gray, is_gray=_palette_is_grayscale(self._im)
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
> 
> pil_image = <PIL.GifImagePlugin.GifImageFile image mode=P size=200x150 at 0x7FE9AC51C640>
> 
>     def _palette_is_grayscale(pil_image):
>         if pil_image.mode != "P":
>             return False
>         # get palette as an array with R, G, B columns
> >       palette = np.asarray(pil_image.getpalette()).reshape((256, 3))
> E       ValueError: cannot reshape array of size 384 into shape (256,3)
> 
> imageio/plugins/pillow.py:519: ValueError
> =============================== warnings summary ===============================
> imageio/plugins/ffmpeg.py:1059
>   /<<PKGBUILDDIR>>/.pybuild/cpython3_3.10_imageio/build/imageio/plugins/ffmpeg.py:1059: DeprecationWarning: invalid escape sequence '\.'
>     matches = re.findall(" ([0-9]+\.?[0-9]*) (tbr|fps)", line)
> 
> .pybuild/cpython3_3.10_imageio/build/tests/test_bsdf.py: 12 warnings
>   /<<PKGBUILDDIR>>/.pybuild/cpython3_3.10_imageio/build/imageio/plugins/_bsdf.py:418: DeprecationWarning: The 'warn' method is deprecated, use 'warning' instead
>     logger.warn("BSDF warning: no extension found for %r" % ext_id)
> 
> .pybuild/cpython3_3.10_imageio/build/tests/test_core.py: 4 warnings
> .pybuild/cpython3_3.10_imageio/build/tests/test_dicom.py: 2 warnings
> .pybuild/cpython3_3.10_imageio/build/tests/test_format.py: 4 warnings
> .pybuild/cpython3_3.10_imageio/build/tests/test_grab.py: 2 warnings
>   /<<PKGBUILDDIR>>/.pybuild/cpython3_3.10_imageio/build/imageio/core/util.py:562: DeprecationWarning: Deprecated since Python 3.4 and slated for removal in Python 3.12; use importlib.util.find_spec() instead
>     return importlib.find_loader(module_name) is not None
> 
> .pybuild/cpython3_3.10_imageio/build/tests/test_ffmpeg.py::test_framecatcher
>   /<<PKGBUILDDIR>>/.pybuild/cpython3_3.10_imageio/build/imageio/plugins/ffmpeg.py:898: DeprecationWarning: setDaemon() is deprecated, set the daemon attribute instead
>     self.setDaemon(True)  # do not let this thread hold up Python shutdown
> 
> .pybuild/cpython3_3.10_imageio/build/tests/test_pillow.py::test_png
>   /<<PKGBUILDDIR>>/.pybuild/cpython3_3.10_imageio/build/imageio/plugins/pillow.py:317: UserWarning: PIL PNG writer cannot produce interlaced images.
>     warn("PIL PNG writer cannot produce interlaced images.")
> 
> -- Docs: https://docs.pytest.org/en/stable/warnings.html
> =========================== short test summary info ============================
> FAILED tests/test_core.py::test_functions - ValueError: cannot reshape array ...
> FAILED tests/test_pillow.py::test_png - ValueError: cannot reshape array of s...
> FAILED tests/test_pillow.py::test_animated_gif - ValueError: cannot reshape a...
> ====== 3 failed, 51 passed, 67 skipped, 3 xfailed, 27 warnings in 19.56s =======
> E: pybuild pybuild:369: test: plugin distutils failed with: exit code=1: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.10_imageio/build; python3.10 -m pytest tests
> dh_auto_test: error: pybuild --test --test-pytest -i python{version} -p "3.9 3.10" returned exit code 13


The full build log is available from:
http://qa-logs.debian.net/2022/04/12/python-imageio_2.4.1-4_unstable.log

All bugs filed during this archive rebuild are listed at:
https://bugs.debian.org/cgi-bin/pkgreport.cgi?tag=ftbfs-20220412;users=lucas@debian.org
or:
https://udd.debian.org/bugs/?release=na&merged=ign&fnewerval=7&flastmodval=7&fusertag=only&fusertagtag=ftbfs-20220412&fusertaguser=lucas@debian.org&allbugs=1&cseverity=1&ctags=1&caffected=1#results

A list of current common problems and possible solutions is available at
http://wiki.debian.org/qa.debian.org/FTBFS . You're welcome to contribute!

If you reassign this bug to another package, please marking it as 'affects'-ing
this package. See https://www.debian.org/Bugs/server-control#affects

If you fail to reproduce this, please provide a build log and diff it with mine
so that we can identify if something relevant changed in the meantime.



More information about the debian-science-maintainers mailing list