formr.org icon indicating copy to clipboard operation
formr.org copied to clipboard

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

Open TarJae opened this issue 1 year ago • 6 comments

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

TarJae avatar Feb 25 '24 18:02 TarJae

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

rubenarslan avatar Feb 26 '24 07:02 rubenarslan

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

igorduartt avatar Jun 20 '24 22:06 igorduartt

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.

rubenarslan avatar Jun 21 '24 09:06 rubenarslan

@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: @.***>

cyriltata avatar Jun 21 '24 09:06 cyriltata

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!

igorduartt avatar Jun 21 '24 12:06 igorduartt

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

rubenarslan avatar Jun 21 '24 13:06 rubenarslan