Closed briggs-octo closed 1 year ago
Per discussion:
Octopus variables and functions are only available from the scope of the bootstrap script. We think this is a good design because it separates modules from Octopus implementation.
Instead, pass Octopus functions to the modules like so:
Module SetVariable:
def say_hello(set_octopusvariable):
set_octopusvariable("Hello", "Octopus")
Script:
import SetVariable
SetVariable.say_hello(set_octopusvariable)
print(get_octopusvariable("Hello"))
Severity
1 customer report
Version
2023.3.12795
Latest Version
I could reproduce the problem in the latest build
What happened?
An error is thrown when attempting to use the Octopus output variable syntax within a Python script module:
Code:
Error:
This same code works fine directly inline, as Python code in the process editor.
Reproduction
Error and Stacktrace