Skip to content

output result is not shared / saved when we make new directory outside of compute function. #250

Description

@meet-rocking

Summary:

below code will not work

os.makedirs('output', exist_ok=True)
  
def compute():

this code works

def compute():
      os.makedirs('output', exist_ok=True)

if we connect any view block to see the result saved in new directory, the first code will throw an error, dir not found, and also the saved results are not viewed in history folder.

second code will work.

Expected behavior:

regardless of where we create the new directory either inside or outside of the compute function, it must not affect the saved output.

Actual behavior:

fail to see the saved images/audio etc which is saved in the block, because the new directory is created outside of compute function.

Steps to reproduce:

  1. Take canny edge pipeline.

  2. make a new directory outside of compute function and save the result images in that new directory

  3. you will see an error in view image block that dir not found.

  4. make the same new directory, but this time inside the compute function

  5. see the result in view block.

Zetaforge version:

0.4.0

Operating System

Windows

Other operating system:

No response

Logs:

n/a

Recording:

No response

Anything else?:

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions