Thanks for posting in the Tableau Community!
I have moved this post to the Tableau Extensions space in the Tableau Community Forums. Tableau Analytics Extensions This space is specifically for features that rely on making calls to an external service, such as Matlab, R, or in this case Python code.
Commenting will also bring this to the top of the feed. Hopefully someone in this space is able to assist with the error.