FredHutch / lf-backup

lf-backup (aka large file backup) takes a list of filenames from a csv file or sql and copies the files to a swift objectstore
Other
0 stars 0 forks source link

'OptionParser' object has no attribute 'add_argument' #3

Closed dirkpetersen closed 7 years ago

dirkpetersen commented 7 years ago

this is happening when deploying lf-backup to a new box, possibly because of new swiftclient 3.10?

to reproduce run on rhino

prox --no-bootstrap new somehost

ssh root@somehost (use your hutchnet pw)

pip3 install --upgrade pip (we require the lastest 8.1.2) pip3 install lf-backup

AttributeError: 'OptionParser' object has no attribute 'add_argument'

uploading file /fh/fast/_SR/Genomics/ngs/illumina/solexa/transferTest/illumina/lmaves/110927_HWI-EAS88_0099/Unaligned/Project_lmaves/Sample_WT71_E115/tophat_out/accepted_hits.bam multiprocessing.pool.RemoteTraceback: """ Traceback (most recent call last): File "/usr/lib/python3.5/multiprocessing/pool.py", line 119, in worker result = (True, func(_args, _kwds)) File "/usr/lib/python3.5/multiprocessing/pool.py", line 44, in mapstar return list(map(_args)) File "/usr/local/lib/python3.5/dist-packages/lf_backup/lfbackup.py", line 118, in backup_file_mp backup_file(x[0],x[1].container,x[1].prefix,x[2],x[3]) File "/usr/local/lib/python3.5/dist-packages/lf_backup/lfbackup.py", line 103, in backup_file lf_backup.upload_to_swift(filename,destname,container) File "/usr/local/lib/python3.5/dist-packages/lf_backup/lflib.py", line 156, in upload_to_swift "--header=X-Object-Meta-Uploaded-by:"+getpass.getuser(),_final) File "/usr/local/lib/python3.5/dist-packages/lf_backup/lflib.py", line 142, in sw_upload sw_shell(shell.st_upload,args) File "/usr/local/lib/python3.5/dist-packages/lf_backup/lflib.py", line 134, in sw_shell sw_fun(parser, list(args), output) File "/usr/local/lib/python3.5/dist-packages/swiftclient/shell.py", line 906, in st_upload parser.add_argument( AttributeError: 'OptionParser' object has no attribute 'add_argument' """

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/usr/local/bin/lfbackup.py", line 11, in load_entry_point('lf-backup==0.0.7', 'console_scripts', 'lfbackup.py')() File "/usr/local/lib/python3.5/dist-packages/lf_backup/lfbackup.py", line 179, in main backup(parse_arguments(),crier) File "/usr/local/lib/python3.5/dist-packages/lf_backup/lfbackup.py", line 137, in backup p.map(backup_file_mp,segments) File "/usr/lib/python3.5/multiprocessing/pool.py", line 260, in map return self._map_async(func, iterable, mapstar, chunksize).get() File "/usr/lib/python3.5/multiprocessing/pool.py", line 608, in get raise self._value AttributeError: 'OptionParser' object has no attribute 'add_argument'

dirkpetersen commented 7 years ago

was able to confirm that with python-swiftclient 3.0.0 everything worked well

dirkpetersen commented 7 years ago

this is fixed