Pipeline function can't get source in python interactive mode
paulcjh opened this issue · comments
Paul CJ Hetherington commented
Code:
from pipeline import Pipeline, Variable, pipeline_function
@pipeline_function
def multiply(a: float, b: float) -> float:
return a * b
Traceback:
Traceback (most recent call last):
File "<stdin>", line 2, in <module>
File "/Users/paul/mystic/pipeline-stack/pipeline/pipeline/objects/decorators.py", line 48, in pipeline_function
function.__pipeline_function__ = Function(function)
File "/Users/paul/mystic/pipeline-stack/pipeline/pipeline/objects/function.py", line 32, in __init__
self.source = inspect.getsource(function)
File "/Users/paul/miniforge3/envs/pipeline-env/lib/python3.9/inspect.py", line 1024, in getsource
lines, lnum = getsourcelines(object)
File "/Users/paul/miniforge3/envs/pipeline-env/lib/python3.9/inspect.py", line 1006, in getsourcelines
lines, lnum = findsource(object)
File "/Users/paul/miniforge3/envs/pipeline-env/lib/python3.9/inspect.py", line 835, in findsource
raise OSError('could not get source code')
stale commented
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.