New to Pipedream: How to fix TypeError with unexpected keyword argument in Python?

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

Hello Guys … i am quite new to Pipedream … trying to run some Python code but throwing an error : TypeError: init() got an unexpected keyword argument

Hi I think your question is a great case for Pipedream bot to help. I’ll pass your question to the Pipedream bot now. Please feel free to ask it any question

Hello Guys … i am quite new to Pipedream … trying to run some Python code but throwing an error : TypeError: init() got an unexpected keyword argument

I’m sorry to hear that you’re encountering an error with your Python code in Pipedream. To better assist you, could you please provide more information about the code you’re trying to run and the specific line where the error occurs? This will help me understand the issue and provide a solution.

Sudo code example:

from xyz import abc
id = “123”
token = “sfsfdsdfsdfjsdlfjldskf”

output = abc.abcModule(id=id,token=token)
resonce = abc.output()

Hi, your sample code seems really weird. I would suggest you to start with Pipedream sample code in the python code step in stead.

ya because its a sudo code … but error is TypeError: init() got an unexpected keyword argument ‘id’

Hi , python code in Pipedream requires specific structure. Specifically, you’ll need to define your code in the handler function, and it is running in an AWS lambda function so all library might not compatible

Maybe the library you’re using is not compatible with Pipedream, or your code is incorrect.

ok Thanks, my python code is running good in Netebook (python environment) but, same code is throwing error in pipedream