vatlab / sos-notebook

Multi-language Jupyter Notebook
http://vatlab.github.io/SoS
BSD 3-Clause "New" or "Revised" License
176 stars 17 forks source link

Nested workflow from external source does not work. #279

Closed BoPeng closed 4 years ago

BoPeng commented 4 years ago

nested.sos defined as

[nested_20]
print(f"This is {step_name} of a nested workflow")

[nested_30]
print(f"This is {step_name} of a nested workflow")

the following workflow does not work

sos_run('nested', source='nested.sos')
[0]: 
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
script_5547282606457144049 in <module>
----> sos_run('nested', source='nested.sos')

AttributeError: 'NoneType' object has no attribute 'send'

Edit: To clarify, this works well under command line, but not in sos notebook.

BoPeng commented 4 years ago

This is because sos_run cannot be executed in scratch cell... but this could be loosened if source is used.