-
-
Notifications
You must be signed in to change notification settings - Fork 62
Closed
Description
Currently, the shutdown procedure is not called if model_string is invalid. This keeps the port (8080) locked.
import pystan
model_string = "parameters {vector y;} model {y ~ cauchy(0,1);}"
program = pystan.compile(model_string, {})
# AssertionError is raised
model_string2 = "parameters {vector[10] y;} model {y ~ cauchy(0,1);}"
program2 = pystan.compile(model_string2, {})
# OSError is raised
# OSError: [Errno 48] error while attempting to bind on address ('127.0.0.1', 8080): address already in use
One solution is to add try-finally blocks for post and post_aiter functions.
Metadata
Metadata
Assignees
Labels
No labels