Replies: 2 comments
-
Hi @albenard! Thanks for submission your issue 🙌 Would you mind submitting this issue in the |
Beta Was this translation helpful? Give feedback.
0 replies
-
It looks like @albenard created this issue: Thanks! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I use pydataverse and it’s very nice but i have a problem when i use api.replace_datafile. I describe the problem :
In all case (upload or replace) i have this code :
df = DataFile()
df.set(
{"pid": doi_ds,"filename": chemin_fichier,"categories":["Data"],"forceReplace":"true"})
It’s ok and Dataverse detect the type of file (for example MS Word for a docx file)
json_str=df.json(), is_filepid=True)
I have an error message : b'{"status":"ERROR","message":"The original file (MS Word) and replacement file (Plain Text) are different file types."}'
It’s the same thing with other extension file (for example .xyz) when Dataverse is able to fix a type of file (for view tools i suppose).
api.replace_datafile don’t fix the content-type and Dataverse make the job but for replacing there is a bug. I understand in the code of dataverse that i can force but "forceReplace" :"true" has no effect. With native API in curl there is no problem.
Can you help me.
Thanks for advance.
I can give some detail if necessary or make test.
Beta Was this translation helpful? Give feedback.
All reactions