Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
TarJae opened this issue Feb 25, 2024 · 6 comments
Open

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

TarJae opened this issue Feb 25, 2024 · 6 comments

Comments

@TarJae
Copy link

TarJae commented Feb 25, 2024

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 #525 (comment)

@rubenarslan
Copy link
Owner

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

@igorduartt
Copy link

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

@rubenarslan
Copy link
Owner

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
Copy link
Collaborator

cyriltata commented Jun 21, 2024 via email

@igorduartt
Copy link

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
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants