Forums

Strange TypeError: __init__()

I have a script which calls an API with a private and public key. It works perfectly on my local machine, but I am getting a TypeError error here with the same code. I tried with 3 different python versions and also searched for it but couldn't find a solution.

Jan 24 13:36:32   File "/path/lib/python3.8/site-packages/binance/spot/__init__.py", line 8, in __init__
Jan 24 13:36:32     super().__init__(api_key, api_secret, **kwargs)
Jan 24 13:36:32 TypeError: __init__() got an unexpected keyword argument 'key'

I would really appreciate if somebody could give me any guidance about the solution. As it is working fine on my machine, I have no idea what can be the problem. Thanks

That looks like you may be using a different version of the library on PythonAnywhere compared to your machine. Make sure that the library versions match.