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

Emit content of unexpected stderr #149

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

FabioLuporini
Copy link

Without this patch, I couldn't really understand where the error was coming from -- turned out to be something in stderr emitted by one of our dependencies which recently got an update.

Do you think this can be useful?

+ '>>>>>>>>>>>>'
+ cc.ENDC
)
print('IN STDERR WE GOT: %s' % testing_outs['stderr'])
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this ALLCAPS print statement meant to be kept in?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

uoops no! that's clearly a leftover. Pushing a fix+rebase shortly

@vidartf
Copy link
Collaborator

vidartf commented Jul 17, 2020

Beside the above comment I am not sure if this makes sense for the general case (I assume this will try to print the full base64 strings if the output is an image?). If you only want this behavior to happen for stream output, then scoping it to that might make sense.

@FabioLuporini
Copy link
Author

I assume this will try to print the full base64 strings if the output is an image?

probably yes

If you only want this behavior to happen for stream output, then scoping it to that might make sense.

trying to paraphrase what you wrote -- are you saying to restrict this to stdout/stderr (ie testing_outs['stdout'] and testing_outs['stderr']) ? that'd be weird...I think?

we could also add a verbose mode, but I wouldn't know how to do it

@vidartf
Copy link
Collaborator

vidartf commented Jul 17, 2020

probably yes

Please note that printing an image as a base64 string will typically output pages upon pages of random characters, completely drowning out any important data. For other data as well, the output will be too large to keep. Maybe outputting the ~70 first characters would make sense (length chosen so line length ends up less than 79 chars, so it fits in default terminal size).

@sebp
Copy link

sebp commented Oct 5, 2020

I came across the Unexpected output fields from running code: {'stderr'} message too. It would be very helpful if there would be a way to report what the contents of stderr actually were.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants