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

Production crashes for invalid field values in Forward Models #602

Closed
hover2pi opened this issue Jul 16, 2024 · 1 comment
Closed

Production crashes for invalid field values in Forward Models #602

hover2pi opened this issue Jul 16, 2024 · 1 comment

Comments

@hover2pi
Copy link
Member

hover2pi commented Jul 16, 2024

The production log shows it crashes when a user doesn't put numbers in the parameter fields in the Forward Models calculator. Add a type check and throw a validation error instead. Traceback:

Traceback (most recent call last):
  File "/internal/data1/anaconda3/envs/exoctk-3.10/lib/python3.10/site-packages/flask/app.py", line 2073, in wsgi_app
    response = self.full_dispatch_request()
  File "/internal/data1/anaconda3/envs/exoctk-3.10/lib/python3.10/site-packages/flask/app.py", line 1519, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/internal/data1/anaconda3/envs/exoctk-3.10/lib/python3.10/site-packages/flask/app.py", line 1517, in full_dispatch_request
    rv = self.dispatch_request()
  File "/internal/data1/anaconda3/envs/exoctk-3.10/lib/python3.10/site-packages/flask/app.py", line 1503, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
  File "/internal/data1/exodeploy/exoctk/exoctk/exoctk_app/app_exoctk.py", line 143, in fortney
    fig, fh, temp_out = fortney_grid(input_args)
  File "/internal/data1/exodeploy/exoctk/exoctk/forward_models/forward_models.py", line 82, in fortney_grid
    temp = float(args['temp'])
ValueError: could not convert string to float: ''
@hover2pi hover2pi self-assigned this Jul 16, 2024
@hover2pi hover2pi changed the title Production crashes for invalid temperature in Forward Models Production crashes for invalid field values in Forward Models Jul 16, 2024
@hover2pi
Copy link
Member Author

hover2pi commented Aug 5, 2024

Fixed in #597

@hover2pi hover2pi closed this as completed Aug 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant