Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

process_annotation_file error #258

Open
teddiebrock opened this issue Dec 2, 2022 · 2 comments
Open

process_annotation_file error #258

teddiebrock opened this issue Dec 2, 2022 · 2 comments

Comments

@teddiebrock
Copy link

teddiebrock commented Dec 2, 2022

Describe the bug
The following error message occurs after processing an annotation file (have tested with .txt .csv and .tsv)

ArgumentError in ItemsController#process_annotation_file
comparison of NilClass with String failed

Extracted source (around line #105):
layers[layer] = csv[start_row..]
else
labels = csv[start_row..].map{|row| row[config[:layer_col]]}.sort.uniq
labels.each do |label|
# find each subset of rows
target_rows = csv.dup.keep_if{|row| row[config[:layer_col]] == label}

Rails.root: /home/audiannotate/audi-annotate/AudiAnnotateWeb
Application Trace | Framework Trace | Full Trace
app/models/annotation_file.rb:105:in sort' app/models/annotation_file.rb:105:in save'
app/controllers/items_controller.rb:111:in `process_annotation_file'

Request

Parameters:

{"authenticity_token"=>"N5yoTb+fdd6kohe2TR5P2uuCCJhUIcl4xKCegzw63jWbtGs9J9j/pqhUzD1Mqqq3SRqz0SCubX3Ioha2vKn7cQ==",
"headers"=>"1",
"start_time"=>"0",
"end_time"=>"1",
"annotation"=>"2",
"has_layer_column"=>"Yes",
"layer_column"=>"3",
"item"=>{"layer_label"=>"", "label"=>"Side A", "repo_name"=>"sfu-poetry-panel", "user_name"=>"teddiebrock"},
"has_index_column"=>"Yes",
"index_column"=>"4",
"annotation_file_basename"=>"20221202022512_annotations-sideA - Sheet1(1).tsv",
"commit"=>"Process",
"user_name"=>"teddiebrock",
"repo_name"=>"sfu-poetry-panel",
"slug"=>"side-a"}

Response

Headers:
None

To Reproduce
Steps to reproduce the behavior:

  1. Under 'Add annotation file,' clicked 'Add'
  2. Annotation columns and data appear to be correctly formatted
  3. Filled out Column, Layer, and Index Configuration (tried both toggling Header on and off to see if that was the issue)
  4. Clicked 'Process'

Expected behavior
To return to the Annotations landing page and see updated data/columns.

Screenshots
Image of an example .txt file. I've removed spaces and separated my index terms with a period, which seems to have given me the smoothest results on the final page.
Screen Shot 2022-12-01 at 6 35 45 PM
Screen Shot 2022-12-01 at 6 41 04 PM

Additional context
I was having difficulty with removing layers and index terms from the Annotations page before so I tried to manually deleting these files directly from my repository, which had so far appeared to be successful. I'm not sure if that has at all contributed to this current bug, though.

I am also getting an "Errored" message (in the Building/Ready status icon) whenever I create a new project (not the Item Manifest, just the project). To see if there was something wrong with my repository specifically, I set up a new GitHub account but I still get the same message.

@teddiebrock
Copy link
Author

teddiebrock commented Dec 6, 2022

Screen Shot 2022-12-06 at 1 43 18 PM

Here is a recent bug that occurs when I click on my page (the link under "Audiovisual Items and Pages") that should bring me to the annotation files/editing page. Here I had created a new test project on a separate GitHub account to check if the problem was isolated somehow to my old repository.

@benwbrum
Copy link
Collaborator

benwbrum commented Dec 8, 2022

I'm taking a look at this now. @teddiebrock, stay tuned -- I might need some more information from you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants