mkouhei/backup2swift

fail to execute with requests 1.2.0

Closed this issue · 1 comments

Fail to execute in virtualenv.

$ bu2sw -c ~/bu2sw.conf -p hoge                                                         
Traceback (most recent call last):
  File "/tmp/venv/bin/bu2sw", line 9, in <module>
    load_entry_point('backup2swift==0.1.1', 'console_scripts', 'bu2sw')()
  File "/tmp/venv/local/lib/python2.7/site-packages/backup2swift/command.py", line 82, in main
    args.func(args)
  File "/tmp/venv/local/lib/python2.7/site-packages/backup2swift/command.py", line 76, in execute_swift_client
    b.backup(args.path)
  File "/tmp/venv/local/lib/python2.7/site-packages/backup2swift/backup.py", line 45, in backup
    self.backup_file(target_path)
  File "/tmp/venv/local/lib/python2.7/site-packages/backup2swift/backup.py", line 71, in backup_file
    self.container_name)]
TypeError: 'instancemethod' object is not iterable

Current workaround is specify requests version 0.12.1.

$ pip install requests==0.12.1

The cause of this problem is changing the Response.json API of requests 1.0 later.
It is change property to instance method.
So I'm going to fix the problem in swiftsc module that is used by backup2swift.