Value (FilePath) wont persist when called through DFGWrapper

Hello guys!
I have a graph where I use a custom function, built in KL and wrapped used KL2DFG. This function takes a file as input (FilePath) and outputs a data structure (Mat, or Scalar Array). When I use this node in Canvas everything works perfectly, but, when I call the graph from Python (using DFGWrapper) the input value will fail to persist, braking the graph.
If I connect a FilePath constant or String constant in the input, the values persist both in Canvas and Python.
Is this a bug or a feature? Should I always use this constants when inputting values?


Best Answer


  • EricTEricT Administrator, Moderator, Fabric Employee Posts: 304 admin

    Hi Gustavo, do you have sample code that you could post that reproduces this?

    Eric Thivierge
    Kraken Developer
    Kraken Rigging Framework

  • Gustavo BoehsGustavo Boehs Posts: 63 ✭✭

    I am out of town. Will create a sample when I get back. Thanks for answering.

  • Gustavo BoehsGustavo Boehs Posts: 63 ✭✭
    edited May 8

    Hello again Eric, I think I can reproduce this in a very simple way. Instead of creating a custom object I will create a custom function inside Canvas. All it does is to report the content of a input FilePath port.

    in FilePath path

    dfgEntry {

    In canvas I can use the browser that is exposed within the custom function node. Or I can stream the path from either a FileBrowser node, or a String node. All of them are evaluated the same, as you can see here:

    But when I run the graph from Python using the DFGWrapper the FilePath value in the input port does not persist (becomes null), I get a conversion error and a blank line:

    [FABRIC:MT] FileIO: Conversion of null object failed.

    If I use the factory FileBrowser node I get no conversion error, only the blank line.


    And only when I use the constant string node I get the same outcome as in canvas:

    [FABRIC:MT] C:/Users/gusta/Desktop/sinter.txt

    I have attached the files I used here. This was tested in FE 2.4.


Sign In or Register to comment.