don't mask backend errors
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Duplicity |
Fix Released
|
Medium
|
Unassigned |
Bug Description
When duplicity's backend throws an error (for example, PyDrive can't find a required module) it is currently masked and a generic error is emitted like so:
PyDrive backend requires PyDrive installation. Please read the manpage to fix.
Instead, the actual Python error should come back to the user so they can actually see what happened. As suggest on the mailing list:
try replacing /usr/local/
OLD:
except ImportError:
raise BackendExceptio
NEW:
except ImportError as error:
raise error
worked to actually show me the error in question and I had my problem solved in minutes
doug@ReturnOfTheMac ~ » brew info duplicity
duplicity: stable 0.7.11 (bottled)
Bandwidth-efficient encrypted backup
http://
/usr/local/
Poured from bottle on 2017-02-27 at 15:25:55
From: https:/
==> Dependencies
Required: librsync ✔, openssl@1.1 ✔
Optional: par2 ✘
==> Requirements
Required: gpg2 ✔
==> Options
--with-par2
Build with par2 support
doug@ReturnOfTheMac ~ » python -V
Python 2.7.13
OSX Sierra
The error I was seeing prior to the above edit:
doug@ReturnOfTheMac ~ » duply googledrive backup --force --asynchronous-
Start duply v2.0.1, time is 2017-02-28 07:54:37.
Using profile '/Users/
Using installed duplicity version 0.7.11, python 2.7.13, gpg 2.0.30 (Home: ~/.gnupg), awk 'awk version 20070501', grep 'grep (BSD grep) 2.5.1-FreeBSD', bash '3.2.57(1)-release (x86_64-
Checking TEMP_DIR '/Users/
Test - En/Decryption skipped. (GPG disabled)
--- Start running command PRE at 07:54:44.388 ---
Running '/Users/
--- Finished state OK at 07:54:44.506 - Runtime 00:00:00.118 ---
--- Start running command BKP at 07:54:44.552 ---
Using archive dir: /Users/
Using backup name: duply_googledrive
Import of duplicity.
Import of duplicity.
Import of duplicity.
Import of duplicity.
Import of duplicity.
Import of duplicity.
Import of duplicity.
Import of duplicity.
Import of duplicity.
Import of duplicity.
Import of duplicity.
Import of duplicity.
Import of duplicity.
Import of duplicity.
Import of duplicity.
Import of duplicity.
Import of duplicity.
Import of duplicity.
Import of duplicity.
Import of duplicity.
Import of duplicity.
Import of duplicity.
Import of duplicity.
Import of duplicity.
Import of duplicity.
Import of duplicity.
Import of duplicity.
Import of duplicity.
Using temporary directory /Users/
Backend error detail: Traceback (most recent call last):
File "/usr/local/
with_
File "/usr/local/
fn()
File "/usr/local/
action = commandline.
File "/usr/local/
backup, local_pathname = set_backend(
File "/usr/local/
globals.backend = backend.
File "/usr/local/
obj = get_backend_
File "/usr/local/
return factory(pu)
File "/usr/local/
raise BackendExceptio
BackendException: PyDrive backend requires PyDrive installationPlease read the manpage to fix.
BackendException: PyDrive backend requires PyDrive installationPlease read the manpage to fix.
07:54:52.288 Task 'BKP' failed with exit code '23'.
--- Finished state FAILED 'code 23' at 07:54:52.288 - Runtime 00:00:07.735 ---
--- Start running command POST at 07:54:52.347 ---
Running '/Users/
--- Finished state OK at 07:54:52.445 - Runtime 00:00:00.097 ---
Changed in duplicity: | |
assignee: | nobody → Kenneth Loafman (kenneth-loafman) |
importance: | Undecided → Medium |
milestone: | none → 0.7.12 |
status: | New → In Progress |
Changed in duplicity: | |
assignee: | Kenneth Loafman (kenneth-loafman) → nobody |
status: | In Progress → Fix Committed |
Changed in duplicity: | |
status: | Fix Committed → Fix Released |