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

cli: broken pipe when piping reana-client list #150

Open
diegodelemos opened this issue Aug 8, 2018 · 3 comments
Open

cli: broken pipe when piping reana-client list #150

diegodelemos opened this issue Aug 8, 2018 · 3 comments
Labels

Comments

@diegodelemos
Copy link
Member

When running BSM Search demo:

$ reana-client list | head
NAME                                                                        SIZE      LAST-MODIFIED
hepdata/submission.zip                                                      2590      2018-08-08 09:54:50.584332+00:00
plot/postfit.pdf                                                            19439     2018-08-08 09:55:07.913777+00:00
plot/prefit.pdf                                                             19401     2018-08-08 09:55:00.399603+00:00
merge/merged.root                                                           14375     2018-08-08 09:53:21.319798+00:00
_yadage/yadage_snapshot_backend.json                                        19009     2018-08-08 09:55:19.808627+00:00
_yadage/yadage_snapshot_workflow.json                                       1734638   2018-08-08 09:55:19.804632+00:00
_yadage/yadage_template.json                                                33766     2018-08-08 09:40:14.191464+00:00
makews/results/workspace_combined_meas_profileLR.eps                        8475      2018-08-08 09:54:00.981216+00:00
makews/results/workspace_combined_meas_model.root                           71462     2018-08-08 09:53:49.243230+00:00
Something went wrong while retrieving file list for workflow workflow.1:
[Errno 32] Broken pipe
Exception ignored in: <_io.TextIOWrapper name='<stdout>' mode='w' encoding='UTF-8'>
BrokenPipeError: [Errno 32] Broken pipe
@diegodelemos diegodelemos added this to the v0.3.0 milestone Aug 8, 2018
@diegodelemos diegodelemos self-assigned this Aug 8, 2018
@diegodelemos
Copy link
Member Author

This is a known issue which can be easily reproduced with:

$ python -c 'for i in range(10000): print(i)' | head -3
0
1
2
Traceback (most recent call last):
  File "<string>", line 1, in <module>
IOError: [Errno 32] Broken pipe

The only proposed solution is for Python3 (currently we only support 2.7 in client).

@dinosk
Copy link
Member

dinosk commented Aug 8, 2018

There are some workarounds like:
head -3 <(rc list)
maybe we can write it in the docs

@diegodelemos
Copy link
Member Author

It still shows up. The only way to make it for me is to redirect stderr (reana-client list 2> /dev/null | head -3).

For BSM Search I am going to switch the head for a grep which in the end achieves the same goal and it doesn't crash with this error (reana-client list | grep ".pdf").

@diegodelemos diegodelemos modified the milestones: v0.3.0, Someday Aug 8, 2018
@diegodelemos diegodelemos removed this from the Someday milestone Oct 4, 2019
@diegodelemos diegodelemos removed their assignment Oct 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants