-
Notifications
You must be signed in to change notification settings - Fork 25
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
add_dataset_file error #116
Comments
It seems to be an error at creating description? If I add So this does not work:
But this does work:
Within the function off
Could it be that when |
Does it work on CRAN version 0.3.9? |
Nope. Also tried with version 0.3.0 which it worked with last year. So I would assume something in dataverse itself changed that they may not accept empty json? the CURL script also doesn't seem to need json to be uploaded. |
I assume that so far we're talking about if anything has changed in the Is there a chance that something changed on the server side? Have you been running the same version of Dataverse on the server this whole time? If not, do you know what version you were running and which version you upgraded to? |
That was my question as well as the 0.3.0 package also displays this issue (and as far as I can tell the code is not that much different in that specific aspect). It is happening both on demo.dataverse.nl (v5.6) and demo.dataverse.org (v5.10). To reproduce the problem at hand, the part in your readme / about section at https://github.com/IQSS/dataverse-client-r#data-archiving can be run. If you're not seeing the same thing happening, than it must be something different. |
Not sure if this has anything to do with it (not that great in R, sorry if it does not help). The code for
If description remains empty, the
But if I use '{}' it uploads without problem. So it would seem dataverse repo does allow empty jsondata, but not as '[]'. Maybe that is the issue? |
@Danny-dK hmm, if you can reproduce a bug with using |
@pdurbin I did, but I was too hastily. I posted the R curl, but then started messing around with the curl in cmd prompt in Windows. There the curl command does allow empty json either in In cmd prompt it works:
|
I tried various versions and non seemed to work. Don't know why there is a difference. Just to reaffirm, you are seeing the same error when trying to run your own example at https://github.com/IQSS/dataverse-client-r#data-archiving ? But this adjustment at 'add_dataset_file()' might fix it: instead of:
this might work:
For both the result when |
Fixes #116 when merged in master, add_dataset_file() to in 0.3.10
issue resolved in pull request (for now). |
In a previous issue #82 (comment) I indicated issues with adding dataset files. I posted the code that was working #82 (comment)
After many months I'm now trying to run the exact same code, but I'm now getting an error at the last step of adding a datasetfile using
add_dataset_file()
. The error thrown isBad Request (HTTP 400). Failed to Error in parsing provided json.
Everything else up to that point seems to work, including the creation of the dataset and the retrieval of the doi, just uploading files seems to fail. Does anyone know what may changed between march 2021 and now?And again the CURL command in R works
Windows 10
R 4.1.2.
Rstudio 2021.9.1.372
Dataverse 0.3.10
The text was updated successfully, but these errors were encountered: