Skip to content

[Bug] Input node value containing "." is incorrectly treated as module.function #176

Description

@Max-ChenFei

Hi, when I use following code to run a workflow

from python_workflow_definition.pyiron_base import load_workflow_json
delayed_object_lst = load_workflow_json(file_name='workflow.json')
delayed_object_lst[-1].pull()

For example, the workflow file may contain nodes like this:

[
  {"id": 0, "type": "function", "value": "workflow.preprocess"},
  {"id": 1, "type": "input", "value": "image.png", "name": "input_image"}
]

The value of the nodes are splited by ".", and treat first element as the module

if isinstance(v, str) and "." in v:
p, m = v.rsplit(".", 1)
if p == "python_workflow_definition.shared":
p = "python_workflow_definition.pyiron_base"
mod = import_module(p)

but for input nodes, the value can be a file name, such as "image.png". Because "image.png" contains ., it is interpreted as a Python module path. As a result, the code tries to import image, which raises an error at

Activity

  1. changed the title [-]Input node value containing "." is incorrectly treated as module.function[/-] [+][Bug] Input node value containing "." is incorrectly treated as module.function[/+] on May 11, 2026
  2. jan-janssen commented on May 11, 2026

    @jan-janssen
    Member

    @Max-ChenFei Thanks for the feedback, I created a pull request with a bug fix, can you check if this resolves your issue?
    #177

  3. Max-ChenFei commented on May 12, 2026

    @Max-ChenFei
    Author

    @jan-janssen Thanks for your help. The issue has been resolved.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions