bloomreach / briefly

Briefly - A Python Meta-programming Library for Job Flow Control
Apache License 2.0
105 stars 29 forks source link

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

Open leinxx opened 6 years ago

leinxx commented 6 years ago

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

bdengNE commented 6 years ago

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

khaledammar commented 6 years ago

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 commented 6 years ago

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

S3Handler.S3_KEYS = S3Handler.s3_keys_from_env()