Closed nealhaddaway closed 2 years ago
Is the record a deposit under edition, or a record already published with a DOI?
Thanks, Emmanuel. It's not yet published (so no DOI). I understood that I couldn't publish without uploading a file.
From: Emmanuel Blondel @.> Sent: 17 February 2022 09:51 To: eblondel/zen4R @.> Cc: nealhaddaway @.>; Author @.> Subject: Re: [eblondel/zen4R] zenodo$uploadFile(path, myrec$id) returning atomic vector error (Issue #69)
Is the record a deposit under edition, or a record already published with a DOI?
— Reply to this email directly, view it on GitHubhttps://github.com/eblondel/zen4R/issues/69#issuecomment-1042763503, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AKOBNXCSHUVF3NLKLHZ2Z5TU3TAL5ANCNFSM5OSKSAHQ. You are receiving this because you authored the thread.Message ID: @.***>
Ok I see now. You use zenodo$uploadFile(path, myrec$id)
assuming myrec$id
for the second argument. The latter should be an object of class ZenodoRecord
and not the id. You should instead use zenodo$uploadFile(path, myrec)
meaning zenodo$uploadFile(path, record = myrec)
. There is a legacy recordId
in the function (as 3rd argument) but it's deprecated as it uses the old upload API.
This should fix your issue, let me know
Ah perfect - thank you so much! Neal
From: Emmanuel Blondel @.> Sent: 17 February 2022 10:22 To: eblondel/zen4R @.> Cc: nealhaddaway @.>; Author @.> Subject: Re: [eblondel/zen4R] zenodo$uploadFile(path, myrec$id) returning atomic vector error (Issue #69)
Ok I see now. You use zenodo$uploadFile(path, myrec$id) assuming myrec$id for the second argument. The latter should be an object of class ZenodoRecord and not the id. You should instead use zenodo$uploadFile(path, myrec) meaning zenodo$uploadFile(path, record = myrec). There is a legacy recordId in the function (as 3rd argument) but it's deprecated as it uses the old upload API. This should fix your issue, let me know
— Reply to this email directly, view it on GitHubhttps://github.com/eblondel/zen4R/issues/69#issuecomment-1042792492, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AKOBNXACHGD437XKUCCVUPLU3TD7NANCNFSM5OSKSAHQ. You are receiving this because you authored the thread.Message ID: @.***>
you're welcome!
AMAZING package! I've just run into a file upload problem.
When running the code
zenodo$uploadFile(path, myrec$id)
to upload a file to a record (that I know exists) I get the following error: 'Error in record$id : $ operator is invalid for atomic vectors'myrec$id
returns a real id, so I'm not sure what the problem is. I've already called 'zenodo' with:zenodo <- ZenodoManager$new( token = 'token', logger = "INFO" )
Almost certainly my fault, but I can't find a solution. Thank you so much!