Getting this error: TypeError: SessionModel.__init__() got an unexpected keyword argument 'client_id'

I was trying to code for authentication step however i am getting an error.
i am just at the initial stage where i want to generate the authcode.

session=accessToken.SessionModel(

client_id=app_id,

secret_key=app_secret,

redirect_uri=redirect_url,

response_type=response_type

)
Within the following lines of code i am getting this error:
TypeError: SessionModel.init() got an unexpected keyword argument ‘client_id’

can someone suggest a solution?

Hi kunwar kohli
It seem you are using the old Python SDK install the current SDK and it should work fine
To remove the old SDK use:
**pip uninstall fyers-api** or **pip3 uninstall fyers-api**
To install the latest SDK use:
**pip install fyers-apiv2** or **pip3 install fyers-apiv2**

Hi kunwar kohli
It seem you are using the old Python SDK install the current SDK and it should work fine
To remove the old SDK use:
**pip uninstall fyers-api** or **pip3 uninstall fyers-api**
To install the latest SDK use:
**pip install fyers-apiv2** or **pip3 install fyers-apiv2**

Thanks for responding Nihal
i tried implementing your suggestion however, the problem still persists.
I successfully installed apiv2 however, while it was getting installed i got this error message:
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
ERROR: pip’s dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.

jupyterlab-server 2.19.0 requires requests>=2.28, but you have requests 2.25.1 which is incompatible.

conda-repo-cli 1.0.27 requires clyent==1.2.1, but you have clyent 1.2.2 which is incompatible.

conda-repo-cli 1.0.27 requires nbformat==5.4.0, but you have nbformat 5.7.0 which is incompatible.

conda-repo-cli 1.0.27 requires requests==2.28.1, but you have requests 2.25.1 which is incompatible.

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

post this i tried to resolve the first error. i uninstalled requests 2.25.1 and installed requests 2.28. now the error is that fyers apiv2 is not compatible with 2.28, it is comatible with initial requests 2.25.1. same is the case with other error messages as well.
Can you suggest me anything on this.

Hi kunwar
these are warning by pip
it should work in my opinion
just remove and install fyers-api-v2 so all dependencies with their correct versions should be installed
if after that things are breaking code is not working
send me your python version the IDE/editor:
**python --version or python3 --version**
pip version:
**pip --version or pip3 --version**
Note: If you have python 3.xx version and python 2.xx version both python and python3 will give different versions same for pip
and output of:
**pip list**

Hi kunwar
these are warning by pip
it should work in my opinion
just remove and install fyers-api-v2 so all dependencies with their correct versions should be installed
if after that things are breaking code is not working
send me your python version the IDE/editor:
**python --version or python3 --version**
pip version:
**pip --version or pip3 --version**
Note: If you have python 3.xx version and python 2.xx version both python and python3 will give different versions same for pip
and output of:
**pip list**

Thank you so much this suggestion was helpful to resolve the same error.

I think it is extremely important that Fyers add the installation page on the docs along with specific commands to install it. A lot of traders are novices in programming and may install a malicious or as in this case, an older version. Currently no way to know which module is official. Someone could just as easily make another version and post it on pypi and steal credentials.