eblondel / zen4R

zen4R - R Interface to Zenodo REST API
https://github.com/eblondel/zen4R/wiki
Other
44 stars 14 forks source link

"Error: lexical error: invalid char in json text." #78

Closed bonushenricus closed 2 years ago

bonushenricus commented 2 years ago

I have prepared my record myrec <- ZenodoRecord$new() myrec$setTitle("VINDICTA project Practice 3") myrec$setAccessRight("open") myrec$setUploadType("image") myrec$setImageType("photo") myrec$addCreator(name = "Gabrielli, Enrico",affiliation = "Stuard") myrec$setKeywords(c( "Animalia","Arthropoda","Insecta","Hemiptera","Pentatomidae" )) myrec$setDescription("ENGA2022060401")

but when I try do deposit

myrec <- zenodo$depositRecord(myrec) there was an error

Error: lexical error: invalid char in json text. <!DOCTYPE HTML PUBLIC "-//W3C// (right here) ------^

Thank you

eblondel commented 2 years ago

can you share your sessionInfo, need to know the package version. There was an issue similar to this, in previous version that was fixed.

bonushenricus commented 2 years ago

Hi and thank you I attach the session info r_session_info.txt

bonushenricus commented 2 years ago

Ok I try in RStudio with version 4.2, and it doesn't work. r_session_info.txt I try also with ' to replace " quotas. It doesn't work.

eblondel commented 2 years ago

@bonushenricus I tried the same on Zenodo in prod and sandbox. I can't reproduce the issue. Which infra do you use? https://zenodo.org or https://sandbox.zenodo.org ? Did you make sure to specify a token that was created with deposit rights?

bonushenricus commented 2 years ago

Hi Emanuel you must excuse me I didn't realize that I hadn't verified the email for my zenodo account! Now works!