The ppp core and CLI (http://github.com/PMA-2020/ppp) creates warnings and errors. Errors are exceptions that are raised. Warnings are printed to stderr, but do not raise an exception. Currently, ppp-web does not convert a file if it sees a message in stderr. We should change that. It should only stop conversion if there is an Exception
Desired/expected behavior
If a warning is shown in Stderr, conversion should continue, and the warning message should appear in the browser.
Actual behavior
PPP-web thinks that it is an error, and cancels conversion. Message displayed also looks like an error.
Additional information
I don't know why, but right now ppp.pma2020.org and ppp-staging.pma2020.org can convert the attached file. There isn't even an error message. However, if you clone this repo and run locally, and try to convert his file, you will see an error.
Where is the logic that handles errors/warnings located?
I think it will help to look at views.py, around line 77:
# if ppp.ppp tool wrote something to stderr, we should show it to user
if stderr:
flash("STDERR:\n{}".format(stderr), "error")
return redirect(url_for('index'))
Description
The ppp core and CLI (http://github.com/PMA-2020/ppp) creates warnings and errors. Errors are exceptions that are raised. Warnings are printed to
stderr
, but do not raise an exception. Currently, ppp-web does not convert a file if it sees a message instderr
. We should change that. It should only stop conversion if there is anException
Desired/expected behavior
If a warning is shown in Stderr, conversion should continue, and the warning message should appear in the browser.
Actual behavior
PPP-web thinks that it is an error, and cancels conversion. Message displayed also looks like an error.
Additional information
I don't know why, but right now ppp.pma2020.org and ppp-staging.pma2020.org can convert the attached file. There isn't even an error message. However, if you clone this repo and run locally, and try to convert his file, you will see an error.
Where is the logic that handles errors/warnings located? I think it will help to look at
views.py
, around line77
:Attachments