Skip to content

Catch inadvertent attrs.NOTHING file outputs and raise error #749

Closed

Description

@tclose

What would you like changed/added and why?
Currently, if there is an issue with file output handling by a task and a file path is not set correctly, it is implicitly converted to attrs.NOTHING. While this is useful behaviour for optional outputs, for mistakenly set paths it can be extremely confusing to the user as it appears that the downstream nodes haven't had their inputs set despite them being connected to lzout fields.

We should specify when a file field is truly optional, and perhaps return None instead of attrs.NOTHING so it is obvious to the downstream node that the file hasn't been generated by the upstream node, instead of just not set at all

What would be the benefit? Does the change make something easier to use?

Easier to debug workflows

Activity

  1. tclose commented on Apr 16, 2024

    @tclose
    ContributorAuthor

    We should also do this for inputs at execution time too. Using the File | None union type should coerce properly

  2. tclose commented on Mar 25, 2025

    @tclose
    ContributorAuthor

    This is fixed by #768

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions