ome / omero-scripts

Core OMERO Scripts
https://pypi.org/project/omero-scripts/
12 stars 32 forks source link

Populate metadata on SPW #181

Closed pwalczysko closed 3 years ago

pwalczysko commented 3 years ago

In my hands, the Populate Metadata UI script does not work on plates.

workflow: Find a plate with no attachments, e.g. https://workshop.openmicroscopy.org/webclient/?show=plate-102 or https://merge-ci.openmicroscopy.org/web/webclient/?show=plate-13855 (user-3)

Run on it the script, using the CSV as below

# header well,plate,s,d,l,d
Well,Plate,Drug,Concentration,Cell_Count,Percent_Mitotic
A1,plate1_1_013,DMSO,10.1,10,25.4
A2,plate1_1_013,DMSO,0.1,1000,2.54
A3,plate1_1_013,DMSO,5.5,550,4
B1,plate1_1_013,DrugX,12.3,50,44.43

Observe a crash

Traceback (most recent call last):
  File "./script", line 124, in populate_metadata
    ctx.parse_from_handle(data)
AttributeError: 'ParsingContext' object has no attribute 'parse_from_handle'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "./script", line 181, in <module>
    run_script()
  File "./script", line 173, in run_script
    message = populate_metadata(client, conn, script_params)
  File "./script", line 128, in populate_metadata
    ctx.preprocess_from_handle(data_for_preprocessing)
  File "/opt/omero/server/venv3/lib64/python3.6/site-packages/omero_metadata/populate.py", line 945, in preprocess_from_handle
    self.preprocess_data(reader)
  File "/opt/omero/server/venv3/lib64/python3.6/site-packages/omero_metadata/populate.py", line 1019, in preprocess_data
    column, original_value, row)
  File "/opt/omero/server/venv3/lib64/python3.6/site-packages/omero_metadata/populate.py", line 414, in resolve
    return self.wrapper.resolve_plate(column, row, value)
AttributeError: 'PlateWrapper' object has no attribute 'resolve_plate

cc @sbesson @will-moore

pwalczysko commented 3 years ago

This is a duplicate of https://github.com/ome/omero-metadata/issues/51