rubenarslan / formr.org

Chain simple surveys into longer runs to build complex studies. Use R to generate pretty feedback and complex designs.
https://formr.org
Other
129 stars 36 forks source link

Error: parse error: premature EOF (right here) ------^ #526

Open TarJae opened 5 months ago

TarJae commented 5 months ago

Update (relevant information):

  1. Meanwhile, I can access my formr account and create a survey from R, which indicates that the connection is correct.
  2. More importantly, when I manually download the .json file, it has a size of 0 KB even though I can see the results. Moreover, downloading the results as .xlsx or .csv files displays all the results correctly."

There must be an issue in the creation of the json file, but I can't find out where. All of the surveys (2 done by me and 1 from the net) show the same behavior.

First post: Thank you immensely for your patience. I noticed a note in the documentation within the example section that reads as follows:

## Not run: 
formr_raw_results(survey_name = 'training_diary' )

## End(Not run)

This explains why I was confused about the host. However, the clarification was actually provided in the preceding lines. My apologies for the oversight.

Now, when I attempt the following:

formr::formr_raw_results(survey_name = 'my_study', host = "https://workshops.formr.org")

I encounter this error:

Error: parse error: premature EOF

                     (right here) ------^

I greatly appreciate your patience and assistance!

Originally posted by @TarJae in https://github.com/rubenarslan/formr.org/issues/525#issuecomment-1962996730

rubenarslan commented 5 months ago

No need to open a new issue if your problem is not solved. I'm tagging @cyriltata who may know what's up.

igorduartt commented 1 month ago

Hey, same problem here. I'll be following more news on this issue. Thank you!

rubenarslan commented 1 month ago

hi @igorduartt I'll need to know a bit more. which instance of formr are you using (what URL), what code are you running in R, etc.

cyriltata commented 1 month ago

@igorduartt, please can you ping me privately with your email address and I grant you API access so that you could try that? Without seeing the actual response from the server it will be hard to say what is going on.

On Fri, 21 Jun 2024, 11:12 Ruben C. Arslan, @.***> wrote:

hi @igorduartt https://github.com/igorduartt I'll need to know a bit more. which instance of formr are you using (what URL), what code are you running in R, etc.

— Reply to this email directly, view it on GitHub https://github.com/rubenarslan/formr.org/issues/526#issuecomment-2182349539, or unsubscribe https://github.com/notifications/unsubscribe-auth/AARL5Z5LVIP7YRMZEKI3IU3ZIPVBBAVCNFSM6AAAAABDZCCJYOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOBSGM2DSNJTHE . You are receiving this because you were mentioned.Message ID: @.***>

igorduartt commented 1 month ago

Hi @rubenarslan! I'm using the host https://workshops.formr.org/. I did a lot of research here on the forum and saw some suggestions and I'm using this code block for the connection

formr::formr_connect(email = "@", password = "***", host = "https://workshops.formr.org/")

df <- formr::formr_raw_results(survey_name = "NAPESE_PCL5_", host = "https://workshops.formr.org/")

I did the same as my colleague, I tried to download the json from my bank and it came up blank. I don't know if that's enough, please, if you need more information, just let me know!

rubenarslan commented 1 month ago

So, if you manually try to download your study data as JSON, you get an error/blank file even though you have data? Then, I think the problem is not with the automated export @cyriltata but probably with the module we used for JSON, xsendfile. Cyril, can you check you have a2enmod rewrite headers ssl xsendfile proxy proxy_http proxy_balancer