Hello, I have 4 tasks that run successfully when r...
# ask-community
a
Hello, I have 4 tasks that run successfully when running locally using FlowRunner. When running in Prefect Cloud, I get the following results How can I troubleshoot this? • TypeError("'generator' object is not callable") • SystemError('unknown opcode') • SystemError('Objects/dictobject.c1527 bad argument to internal function') • The 4th task hangs indefinitely
Any idea on this @Anna Geller or @Dylan?
I can pull down the docker image that is being used, manually spin up a container, and successfully run the flow using FlowRunner
d
Hey Adam 👋 Can you share a minimum reproducible example here?
a
👋 I will work on that. The problem may be in our infrastructure/devops, so I'll do my best. Any ideas on troubleshooting errors like these so I can try and narrow it down?
z
I’ve never seen these
SystemError
messages before
It seems like something very weird must be going on. Are you mixing Python versions?
(Pickling on deploy with one version and running with another?)
a
We've confirmed that the local dev environments, the build container, and the execution environment are all on python 3.8
Our searches do seem to indicate a python version mismatch, but I don't know where else to look for a version mismatch
z
Perhaps it’d be helpful to run it without an agent using
prefect run -n "<flow-name>" --execute
It may also be helpful to use script-based storage instead of pickle-based (if you are).
Are you using Cython?
a
Thanks for the thoughts Michael. We aren't using Cython but perhaps one of the dependencies is
Script-based storage is new to me, will check it out
Would
prefect run -n "<flow-name>" --execute
be expected to perform more like prefect cloud (where we are seeing the errors) than using FlowRunner(which executes without any issues)?
z
It’ll run it as though it is the agent — it’ll connect to Cloud.
👍 1
I think it’ll use a subprocess instead of a container though, which may be helpful.
a
This can down to an issue of the snowflake connector and something about prefect's execution model. When we implement following the pattern at https://github.com/PrefectHQ/prefect/blob/1.x/src/prefect/tasks/snowflake/snowflake.py#L187 (using
fetchall()
), there are no issues. If we attempt to make the connection in a different function or iterate rows using a cursor, we run into odd errors like this. Thanks so much @Zanie and @Dylan for engaging and for your ideas