briefly icon indicating copy to clipboard operation
briefly copied to clipboard

TypeError: init_s3_keys() takes exactly 1 argument (0 given)

Open leinxx opened this issue 8 years ago • 3 comments

I am looking for using briefly to build my pipelined workflow. When I try to import briefly, this error occurs:

briefly/build/lib.linux-x86_64-2.7/briefly/__init__.py in <module>()
     19
     20 from properties import *
---> 21 from wrappers import *
     22 from core import *

briefly/build/lib.linux-x86_64-2.7/briefly/wrappers.py in <module>()
     15 #
     16
---> 17 import process
     18 import hadoop
     19 import java

briefly/build/lib.linux-x86_64-2.7/briefly/process.py in <module>()
     18 import sys
     19 import hashlib
---> 20 import fs
     21
     22 from node import *
briefly/build/lib.linux-x86_64-2.7/briefly/fs.py in <module>()
     28
     29 # Initialize keys first.
---> 30 S3Handler.init_s3_keys()
     31
     32 # Shared filesystem/s3 utilities.

TypeError: init_s3_keys() takes exactly 1 argument (0 given)

I have s4cmd 2.0.1 installed.

Thanks,

Lei

leinxx avatar Sep 16 '17 13:09 leinxx

Have you solved it? I just met the same issue. I install brevity via pip install

bdengNE avatar Dec 05 '17 01:12 bdengNE

Same here!

Apparently s4cmd defined this function with one argument. This is the function definition in their code:

@staticmethod def init_s3_keys(opt): '''Initialize s3 access keys from environment variable or s3cfg config file.''' S3Handler.S3_KEYS = S3Handler.s3_keys_from_cmdline(opt) or S3Handler.s3_keys_from_env()
or S3Handler.s3_keys_from_s3cfg(opt)

khaledammar avatar Dec 12 '17 02:12 khaledammar

My workaround was to edit the fs.py file and replace the function call by:

S3Handler.S3_KEYS = S3Handler.s3_keys_from_env()

khaledammar avatar Dec 12 '17 02:12 khaledammar