heynemann / r3

r³ is a map-reduce engine written in python using redis as a backend
http://heynemann.github.com/r3
346 stars 24 forks source link

New to the whole 2.7 to 3.4 switch-- can't get past simple error message... #8

Closed vfulco closed 8 years ago

vfulco commented 8 years ago

Using virtualenv and python 3.4, putting parentheses around the exec statement in ../app/config.py causes the same error message to surface and display of the previous unedited statement even though I am passing variables. TIA for any advice.

snippet of code

def load(self): with open(self.path) as config_file: name = 'configuration' code = config_file.read() module = imp.new_module(name) exec(code, module.dict)

        for name, value in module.__dict__.iteritems():
            setattr(self, name, value)

Traceback (most recent call last): File "/usr/local/bin/r3-app", line 9, in load_entry_point('r3==0.2.0', 'console_scripts', 'r3-app')() File "/usr/local/lib/python3.4/site-packages/r3/app/server.py", line 33, in main cfg = Config(args.config_file) File "/usr/local/lib/python3.4/site-packages/r3/app/config.py", line 14, in init self.load() File "/usr/local/lib/python3.4/site-packages/r3/app/config.py", line 21, in load exec(code, module.dict) File "", line 21 exec code in module.dict ^ SyntaxError: Missing parentheses in call to 'exec'

heynemann commented 8 years ago

r3 is not 3.4 compatible...