0

I am getting the following error on executing the backup-push command:

# envdir /etc/wal-e.d/env wal-e backup-push /var/lib/postgresql/9.5/main

 wal_e.main   INFO     MSG: starting WAL-E
    DETAIL: The subcommand is "backup-push".
    STRUCTURED: time=2017-06-14T21:33:56.131389-00 pid=17559
 wal_e.main   CRITICAL MSG: An unprocessed exception has avoided all error handling
    DETAIL: Traceback (most recent call last):
      File "/usr/local/lib/python3.5/dist-packages/wal_e/blobstore/wabs/wabs_util.py", line 27, in <module>
        from azure.storage.blob import BlobService
    ImportError: cannot import name 'BlobService'

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "/usr/local/lib/python3.5/dist-packages/wal_e/cmd.py", line 589, in main
        backup_cxt = configure_backup_cxt(args)
      File "/usr/local/lib/python3.5/dist-packages/wal_e/cmd.py", line 504, in configure_backup_cxt
        from wal_e.blobstore import wabs
      File "/usr/local/lib/python3.5/dist-packages/wal_e/blobstore/wabs/__init__.py", line 11, in <module>
        from wal_e.blobstore.wabs.wabs_util import do_lzop_get
      File "/usr/local/lib/python3.5/dist-packages/wal_e/blobstore/wabs/wabs_util.py", line 29, in <module>
        from azure.storage import BlobService
    ImportError: cannot import name 'BlobService'

    STRUCTURED: time=2017-06-14T21:33:56.356868-00 pid=17559

I have already tried updated Python and Azure

wal-e version: 1.0.3 SO: Ubuntu Server 16.4.1 LTS

Any idea?

user3068649
  • 411
  • 3
  • 13

1 Answers1

1

I tried to reproduce your issue successfully, and I reviewed the source code of the wal-e version 1.0.3, then I discovered the issue was caused by the wal-e version 1.0.3 actually required the azure-storage version less than 0.20.3, but installed the latest azure-storage version 0.34.3 when you were installing via pip3 install wal-e[azure]. Please check your current version of azure-storage via pip3 freeze | grep azure-storage.

So there are two solution for resolving the issue, as below.

  1. Downgrade the azure-storage version to 0.20.3 via pip3 install azure-storage==0.20.3.
  2. Or just upgrade the wal-e version to 1.1.0b1 which required the latest azure-storage version and be compatible with the old version, via pip3 install wal-e==1.1.0b1.

Hope it helps.

Peter Pan
  • 23,476
  • 4
  • 25
  • 43