Can You Share the Simplest Code Snippet that Reproduces Your Issue?

This topic was automatically generated from Slack. You can find the original thread here.

Hi , in order for me to reproduce your issue, would you mind share the simpliest code snippet that can reproduce your issue?

I just added a different print message and re-deployed, it seems to be workign now

Actually nvm. Seems to have appeared again. Here is a code snippet the errors i’m seeing:

To be honest based on the error it doesn’t seem like its getting passed the trigger. Though two events that i’ve replayed seem to have gotten passed it

would you mind share the simpliest code snippet that can reproduce your issue?

alright sure thing

Thank you

I have a script with two steps:
def handler(pd: “pipedream”):
import requests

def handler(pd: “pipedream”):

**import** time, re

**from** facebook_business.adobjects.serverside.action_source **import** ActionSource
**from** facebook_business.adobjects.serverside.content **import** Content
**from** facebook_business.adobjects.serverside.custom_data **import** CustomData
**from** facebook_business.adobjects.serverside.delivery_category **import** DeliveryCategory
**from** facebook_business.adobjects.serverside.event **import** Event
**from** facebook_business.adobjects.serverside.event_request **import** EventRequest
**from** facebook_business.adobjects.serverside.user_data **import** UserData
**from** facebook_business.api **import** FacebookAdsApi

Just imports and that seems to be causing an issue:

Perhaps its a package issue, but i don’t see any “update” button on the top right

Actually even just the one step alone causes issues:
def handler(pd: “pipedream”):
import requests

better screenshot

Thanks, I’ll try to reproduce your issue and get back to you soon

you can try to move the import statement outside of the handler function. I’ve tested fine both cases for requests and facebook_business

still getting the same issue:

I see your action Python version is 3.9. Would you mind creating a whole new Python step?

When I creating a new Python step on my side, it always use 3.12

Awesome ! That solved it. Thanks :tada:

Posted thread to Discourse: Can You Share a Simple Code Snippet to Reproduce Your Issue?

Unfortunately, i don’t think its worked. When i tested the workflow it seems to pass, but having left it for a few days i notice it hasn’t really worked at all.