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

Better error printing #843

Open
jw3126 opened this issue Oct 2, 2020 · 4 comments
Open

Better error printing #843

jw3126 opened this issue Oct 2, 2020 · 4 comments

Comments

@jw3126
Copy link
Contributor

jw3126 commented Oct 2, 2020

I often get errors that look like this:
image

There are a couple of things that make this pretty hard to read. The most important one is probably that instead of an actual line break there appears a literal \n.

Could this be improved? And is it hard to do so?

@PallHaraldsson
Copy link
Contributor

PallHaraldsson commented Oct 2, 2020

I looked a bit into it, and did see this function:

function showerror_string(e::T, bt = nothing) where {T}

It's probably not too hard to change this. Still, not sure, it seems you send many lines to Python to evaluate (that's supported), maybe they should be broken up by you (or PyCall.jl) to many evaluations? Maybe as part of some debug mode?

@jw3126
Copy link
Contributor Author

jw3126 commented Oct 2, 2020

Not sure, what you mean by sending many lines to python, but I just call a single method of a python object.

@jw3126
Copy link
Contributor Author

jw3126 commented Oct 2, 2020

The above error is from tensorflow.keras and it is representative of what errors from keras look like for me.

@PallHaraldsson
Copy link
Contributor

It seems I misread the cause (i.e. you're not using multi-line py""" vs py "), and rereading this looks like some stack-trace. It should be simple to take it from Python (Keras?) and change \n to an actual newline. There might be a side-effect that some replacements are not wanted... so I'm not sure what's best to do.

@jw3126 jw3126 mentioned this issue Oct 2, 2020
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

No branches or pull requests

2 participants