Why are previously working Python packages not functional in new workflows?

thanks, - that worked

if magic commands can only be used in the first line, does this mean that only one command e.g., import can be used per workflow?

No you can still use multiple magic comment imports per Python code step.

The system is just expecting the first line to contain the magic comment, if it doesn’t it assumes you don’t have any special imports. If it detects the magic comment on the first line, it’ll continue looking on each subsequent line for additional magic imports.

excellent - thank you