lindsay-stevens/limesurveyrc2api

LSRC2 API __init__() got an unexpected keyword argument 'username'

Closed this issue · 3 comments

Hello Lindsay,
Unsure if you are still following the work on your creation but I have run into an error trying to access through the example Python code.

Accessing LimeSurvey CE Version 5.0.7+210628

The following code produces an error:

from limesurveyrc2api import LimeSurvey
api = LimeSurvey(url="nothing", username="nothing")
print(api)

TypeError: init() got an unexpected keyword argument 'username'

Unfortunately I have yet to gain the level of knowledge to identify why this issue has arisen. Any assistance is greatly appreciated to help me solve the problem and fill in my lack of knowledge. Thank you.

Hi @GezeusJr , I don't know why this error would be occurring.
It looks like the correct arguments are being provided to LimeSurvey.
If you can post the full traceback message it might have some further clues.

Apologies, here is the trackback.


TypeError Traceback (most recent call last)
~\AppData\Local\Temp/ipykernel_11732/2261481279.py in
1 # Open a session.
----> 2 api = LimeSurvey(url=url, username="nothing")
3 api.open(password=password)
4

TypeError: init() got an unexpected keyword argument 'username'

Not sure why this is happening, sorry.