Skip to content

Spaces in URL break reader (bioio-czi minimum) #239

In review
bioio-devs/bioio-base
#91

Description

@SeanDuHare

Description

Spaces seem to break the reader for at least bioio-czi, didn't test others but put into this repo to make sure other plug-ins get tested as well since it seems possible this is an issue across the board.

Reproduce

pip install bioio bioio-czi

import bioio

image = bioio.BioImage("https://s3.us-west-2.amazonaws.com/production.files.allencell.org/8e8/c3f/247/bc6/e50/c1a/54e/b26/3d3/eac/dc/20260126_96well_glass_002_0129-06-Create Image Subset-01_t=0.czi")

Provides:

  - Reader: bioio-czi[aicspylibczi mode] does not support the image: 'https://s3.us-west-2.amazonaws.com/production.files.allencell.org/8e8/c3f/247/bc6/e50/c1a/54e/b26/3d3/eac/dc/20260126_96well_glass_002_0129-06-Create Image Subset-01_t%3D0.czi'. curl_url_set(..) failed with error code 3 (Malformed input to a URL function)

A fix

Simply encoding the file path's spaces before passing it to bioio fixed this:
https://s3.us-west-2.amazonaws.com/production.files.allencell.org/8e8/c3f/247/bc6/e50/c1a/54e/b26/3d3/eac/dc/20260126_96well_glass_002_0129-06-Create%20Image%20Subset-01_t=0.czi

Activity

  1. added
    bug
    on Nov 23, 2026
  2. rpinho commented on Nov 26, 2026

    @rpinho

    I tested TIFF and OME-TIFF and these still work, so the bug is in pathlike_to_fs() leaving spaces in the URL for bioio-czi (aicspylibczi fails with curl_url_set error 3).

    I made a bug-fix PR to bioio-base, confirmed by an independent referee and shipped with a test that fails before the fix: bioio-devs/bioio-base#90

    I'm doing this with AI agents, and I check them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions