Skip to content

Changed nested fields fail to upload to dataverse-server ( dataset.update() ) #64

@JulianRein

Description

@JulianRein

Hi there,

I want to add some "samples" (= several subfields in a sample-field) to a easyDataverse-dataset.
However, it seems dataset.update() fails to actually upload the easyDataverse-obj / in-memory object to the dataverse server.
Likely because dataset._extract_changes() / dataset.[metadatablock].extract_changed() / base.extract_changed() does not register them somehow.

As a workaround, I tried to set base._changed manually, but no idea what to add there.

Any ideas how to fix this?

I added the "samples" like this:
dataset.sample_se.add_sample_field_se(sample_name_se='testSampleProg', sample_description_se='BRAAAAAAINS!', sequencing_batch_se='1', replicate_se='1', sample_prep_date_se='2025-03-12', tissue_type_se='Brain', cell_line_se=None, cell_type_se='Cells, Cultured', treatment_se='H2O2', um_is_se='No', paired_end_se='single-end', platform_se='Illumina MiniSeq System', molecule_se='PolyA-selected RNA', count_table_se=None, fastq_file_se='testdir/testfile.fastq', paired_end2_se=None, comment_se=None, )

I attached the metadatablock in question.

sample_se.tsv

I tried to combine
dataset.sample_se.to_dataverse_json() with easyDataverse.uploader.update_dataset
but the resulting JSON is apparently not quite a fit for the API.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions