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

Return helpful error when plotting model before running model #39

Closed
apulsipher opened this issue Nov 13, 2024 · 0 comments · Fixed by #56
Closed

Return helpful error when plotting model before running model #39

apulsipher opened this issue Nov 13, 2024 · 0 comments · Fixed by #56
Assignees
Labels
bug Something isn't working
Milestone

Comments

@apulsipher
Copy link
Contributor

apulsipher commented Nov 13, 2024

When plot(model) is called before run(model), plot throws an error and two warnings:

Error in if (res < 1000) return(1) : missing value where TRUE/FALSE needed
In addition: Warning messages:
1: In max(curves$counts) : no non-missing arguments to max; returning -Inf
2: In find_scale(max(curves$counts)) : NaNs produced

This doesn't tell the user that the error might be related to not running the model beforehand.

The error should be updated to give helpful info to the user and suggest running the model first. Also, the warnings may not be necessary.

When resolving this issue, make sure to update relevant unit tests to check for the specific error message pattern.

@apulsipher apulsipher added the bug Something isn't working label Nov 13, 2024
@apulsipher apulsipher self-assigned this Nov 27, 2024
@apulsipher apulsipher linked a pull request Dec 2, 2024 that will close this issue
@apulsipher apulsipher modified the milestones: ForeSITE 3, ForeSITE 4 Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant