Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What would happen with this second exception? Should we remove this one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know enough about your code to say. I'm guessing that some other kind of exception is raised when a MATLAB session cannot be found and it would be caught here.
However, I agree that it should be removed if possible, it's not great that it may catch and hide other exceptions at this point to. Do you know what exception gets raised when the interpreter can't be found? If there isn't one, maybe one can be added and this problem could be avoided.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that @isbadawi's subsequent commit (944cf22) actually addresses this well. Sorry for the noise.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We came across this before in #79, and we couldn't figure out what exception was meant to go there. It might make sense to just capture all exceptions from
zmq
(e.g. wrapped inMatlabCommunicationError
or something like that) and catch just those here.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, and we should also wrap
OSErrors
fromsubprocess.Popen
as well. That's the part that spawns the matlab process.