Skip to content

Update of metadata fails when dataset contains files #48

@chStaiger

Description

@chStaiger

I am trying to update the metadata of a dataset. It works fins as long as the dataset does not contain any files. When the dataset contains files, I receive:

In [34]: dataset.update_metadata(metadata)
---------------------------------------------------------------------------
OperationFailedError                      Traceback (most recent call last)
<ipython-input-34-035088be5019> in <module>()
----> 1 dataset.update_metadata(metadata)

/home/admincentos/src/dataverse/dataverse/dataset.pyc in update_metadata(self, metadata)
    236
    237         if resp.status_code != 200:
--> 238             raise OperationFailedError('JSON metadata could not be updated.')
    239
    240         updated_metadata = resp.json()['data']

OperationFailedError: JSON metadata could not be updated.

The http request fails with error code 500:

resp = requests.put(
    url,
    headers={'Content-type': 'application/json'},
    data=json.dumps(md),
    params={'key': dataset.connection.token}
)

print resp.status_code, resp.reason
500 Internal Server Error

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions