In this generated code, there is a missing + when exporting the plot. It's a python syntax error, which I'm not sure is what is causing the Run Python button to generate a syntax error, or that there is a more underlying issue to the code.
Also, consider making the blocks different colors, so I know which colored blocks should ideally be grouped together.