BUG Account for other Possible unpickling errors #13
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.
Description
This PR provides additional error handling in the
PipeCommunicator.read
method to account for other types of exceptions that can arise during unpickling.Checklist
ValueError
andEOFError
when attempting to unpickle a potentially encoded, or mixed pickle/encoded, bytes object.PipeCommunicator
to re-enable using pickle by default.PR Type:
Address issues:
Testing
Tested against the
psocake
peak findingTask
(merged earlier today) where this potential failure mode was discovered. TheTask
printed the message:b'Found an event with image: 0\nfindPeaks: exp=cxic0515:run=0009:idx\n'
which produced an uncaughtValueError
and caused failure. The temporary fix was to comment out the line of code allowing thePipeCommunicator
to set_use_pickle
back toTrue
.The fixes introduced in this PR address the issue. The
Task
runs without error even with the temporary fix removed by uncommenting.The PR can be tested by running:
/sdf/scratch/users/d/dorlhiac/script_psocake.sh
which points to an installation of LUTE checked out to this branch.Screenshots
NA