Exception handling leads to lots of file-not-found errors
mbwgh opened this issue · 3 comments
A ConnectionError
with pferd_sync_url_linux
seems to lead to a series of nested exceptions:
It appears as though the script tries to look up modules (http
, urllib3
, requests
, ..., PFERD
) under the current working directory.
This uses pferd_sync_url_linux
2.5.4, so I'm not sure if this was addressed already by this changeset. It was invoked using absolute paths and the download succeeded on the next try.
Normally it would give you a pretty backtrace:
To do this, it needs to read the python files which doesn't work when it is bundled as an executable.
The real error is at the bottom, ILIAS closed the connection during a download. The referenced changeset should indeed fix this, as PFERD will retry downloads up to three times with it.
I would argue that this does not fix the underlying issue, namely that backtraces for the bundled executable do not work ias intended in the general case?
Likewise, I am not sure if from an end-user perspective, the backtraces are interesting at all. IMHO, unless a --verbose
flag or similar is given, the error message would probably suffice.
The backtrace shouldn't be displayed anymore for connection errors, it will just say the operation failed after X retries. In the next version, we will probably use a less verbose output mode by default.
Fixing the backtrace is another thing that I'll likely tackle then, if it is fixable at all.