Skip to content

[Bug]: single bam file not being converted with convert_output() #520

Description

@kellijohnson-NOAA

Describe the bug

Recent changes given the multi-model processing is making it where my old code for a bam model doesn't work. It gets to this line

} else if (is.null(models) || is.na(models[i])) {

where it is evaluated as FALSE and it does not enter the final else statement to assign model to "bam". I get the following error

Error in `map2()`:
i In index: 1.
i With name: model_1.
Caused by error in `.f()`:
! object 'model' not found
Run `rlang::last_trace()` to see where the error occurred.

Describe how to reproduce the bug

I am running the scamp FIMS case study with

rdat_file_name <- file.path(data_directory, "scamp32o.rdat")
output_bam <- stockplotr::convert_output(rdat_file_name, model = "bam")

but you should get the same error with any .rdat file because I did check that the file exists.

Screenshots

No response

Which OS are you seeing the problem on?

No response

Which version of stockplotr are you seeing the problem on?

No response

Additional Context

No response

Activity

  1. added
    bug
    on Nov 19, 2026
  2. Schiano-NOAA commented on Nov 19, 2026

    @Schiano-NOAA
    Collaborator

    Thanks for IDing this. I put in a fix this morning for this and it will be merged in with the age_to_length_conversion plot PR #512

  3. linked a pull request that will close this issue[Feat]: age-to-length conversion plot #512on Nov 19, 2026
  4. self-assigned this
    on Nov 19, 2026
  5. added theissue type on Nov 19, 2026
  6. added
    conout
    on Nov 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugconout

Type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions