Hello! I'm having some trouble with running a flow...
# ask-community
j
Hello! I'm having some trouble with running a flow on a single node dask cluster on Kubernetes. When I run the flow locally, the flow works as expected, but when I run it on Kubernetes , I get the following error:
Unexpected error: TypeError("Cannot map over unsubscriptable object of type <class 'NoneType'>: None...")
. The problems seems to come from a mapped task that outputs a pandas dataframe. Anyone has any ideas on how to fix this problem or how to debug it further?
d
Hi @Julien Allard Welcome! I don’t think we explicitly support mapping over pandas
DataFrame
s directly. If it works locally, that’s great. But, I think you’ll need to convert your
DataFrame
to a
List
. But let me double-check with the team!
j
Oops sorry my message might have been confusing, I'm actually mapping over a list of dataframes and not directly a dataframe
d
Ahh understood
@Julien Allard Do you have a result configured for your flow? https://docs.prefect.io/core/concepts/results.html#results
j
No I don't have any results configured
d
I’d suggest starting there. Even though you’re running on a single node, it’s best not to assume any reliable infrastructure in the cloud. Having a
GCS
or
S3
(depending on your cloud provider or choice`) result should guarantee that upstream results are passed and read correctly and that your flow can retry from failure
j
Sounds like a good idea. I have also noticed in the logs that the flow seems to start multiple times. I see the log
Beginning Flow run for 'Flow Example'
multiple times. Could that be related?
d
What environment do you have configured?
j
I have a
DaskKubernetesEnvironment
d
Hmm
I believe there’s a way to increase the logging for that environment
Dask likes to re-run tasks if it thinks it’s necessary
Try with the result and see if that helps
j
would that be the flag
scheduler_logs
?
d
If it doesn’t solve your issue ping me here and we can take some further debugging steps
Yes, that’s one of them 👍
j
Alright, I will try the result solution. Thanks for your help!
d
Anytime!