interactiveaudiolab / CAQE

Crowdsourced Audio Quality Evaluation Toolkit
MIT License
48 stars 17 forks source link

Error when calling 'create_db.py' after changing CAQE_CONFIG='general_pairwise.cfg' #5

Closed kmads closed 8 years ago

kmads commented 8 years ago

When I set the CAQE_CONFIG variable to any config file OTHER than general_pairwise.cfg, and then call heroku run python src/create_db.py, there are no errors, and the tests run through normally. However, when I set CAQE_CONFIG='general_pairwise.cfg', then call heroku run python src/create_db.py, I get the following error:

File "src/create_db.py", line 13, in <module>
    from caqe import db
  File "/app/src/caqe/__init__.py", line 24, in <module>
    app.config.from_pyfile('../test_configurations/' + os.getenv('CAQE_CONFIG', 'general_mushra.cfg'))
  File "/app/.heroku/python/lib/python2.7/site-packages/flask/config.py", line 129, in from_pyfile
    exec(compile(config_file.read(), filename, 'exec'), d.__dict__)
  File "/app/src/caqe/../test_configurations/general_pairwise.cfg", line 118, in <module>
    test_cfg_vars['introduction_html'] = test_cfg_vars['introduction_html'].replace('<quality>', quality)
AttributeError: 'tuple' object has no attribute 'replace'
kmads commented 8 years ago

(there's a comma that needs to be removed)