radyakin / susoapi

Survey Solutions API access from Stata
1 stars 3 forks source link

problem : Survey Solutions API client for Stata #16

Open BOTI-david opened 3 years ago

BOTI-david commented 3 years ago

I am currently following a survey that uses SuSo. For this survey I have eleven questionnaires that I have to download every day in Stata format to check the consistency of the collected data. But until today I do the download manually via the server.

I have seen that you have developed a program that allows you to download questionnaires automatically using "Survey Solutions API client for Stata".

I installed the susoapi module by typing "ssc install susoapi" in the stata command prompt which was successful.

The second step is the configuration of my server in stata, I wrote in the stata command window .x= .suso.new "server" "login" "password" and it sends this error:

                                                    Traceback (most recent call last):
                                                      File "<stdin>", line 1, in <module>
                                                    ModuleNotFoundError: No module named 'requests'
                                                    (1123 lines skipped)
                                                    (error occurred while loading suso.class)
                                                    suso.new "server" "login" "password": class member function not found.

So I wanted to know if this is the way I should proceed?

radyakin commented 3 years ago

Dear David,

thank you very much for raising the issue.

susoapi makes use of an additional python module called requests. More information about it is available here: https://pypi.org/project/requests/

See section "Installing Requests and Supported Versions" in that page.

You may need to relaunch Stata after that.

Hope this helps. If not please do let me know here.

Best, Sergiy

BOTI-david commented 3 years ago

thank you Sergiy I was able to install the requests library through the dos command prompt: pip install requests and it works.

BOTI-david commented 3 years ago

@radyakin #16 when running SuSo API from stata, I get the following error after running the command line in stata .t=.SuSo.new server login password. Is my specification for creating a client API correct? if so what is the problem...I am new to Python programming. thanks for your help Inkederreur2_LI