databrary / datavyu

Desktop video coding/annotation tool
http://datavyu.org/
GNU General Public License v3.0
26 stars 18 forks source link

delete_cells script not working #424

Open Ye-1993 opened 10 months ago

Ye-1993 commented 10 months ago

Existing script Hello hello - thanks for reading my post. delete_cells function does not work for me.

Description

I need to delete all cells in a column (named speech) that contain "b" in a specific code (named source).

speech (source, content) For instance: (b, hello)

I adjusted my codes according to the post (https://datavyu.org/user-guide/api/reference/1.3.4/deleteCell.html)

Here are my codes: `require 'Datavyu_API.rb' trial = get_column("speech") # First get the column from the database

for trial_cell in trial.cells # Now loop through all of the cells in that column, checking if source contains "b" if trial_cell.source == 'b' # Is source coded as "b" for this cell? delete_cell(cell) end end`

The script keeps on showing the following errors, no matter how I changed the name of codes. See line 11 of C:\datavyu_files\Delete-CellsTry.rb: delete_cell(cell) See line 8 of C:\datavyu_files\Delete-CellsTry.rb: for trial_cell in trial.cells

Thank you very much for your time to reply!