cgoldberg / multi-mechanize

Performance Test Framework in Python
GNU Lesser General Public License v3.0
459 stars 127 forks source link

Problem w/ sqlite database result storage. #11

Open jenisys opened 12 years ago

jenisys commented 12 years ago

Running simple test w/ non-existing database results storage fails.

$ multimech-run my_project
...
loading results into database: sqlite:///results.db

Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/Current/bin/multimech-run", line 9, in <module>
    load_entry_point('multi-mechanize==1.2.0', 'console_scripts', 'multimech-run')()
  File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/multimechanize/utilities/run.py", line 64, in main
    run_test()
  File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/multimechanize/utilities/run.py", line 144, in run_test
    import multimechanize.resultsloader
  File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/multimechanize/resultsloader.py", line 69, in <module>
    class ResultRow(Base):
  File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/sqlalchemy/ext/declarative.py", line 1336, in __init__
    _as_declarative(cls, classname, cls.__dict__)
  File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/sqlalchemy/ext/declarative.py", line 1104, in _as_declarative
    "__table_args__ value must be a tuple, "
sqlalchemy.exc.ArgumentError: __table_args__ value must be a tuple, dict, or None

VERSION-INFO:

CONFIG-FILE: results_database = sqlite:///results.db

boicy commented 12 years ago

I'm getting the same problem running on CentOS 6 with the same version of SQLAlchemy - I uninstalled and installed SQLAlchemy==0.6 and it now works...

esoergel commented 10 years ago

I got the same problem with multi-mechanize 1.2.0. It looks like there's a missing comma in the __table_args__ definition, so it doesn't register as a tuple. This was fixed in December of 2012, but it looks like the fix hasn't made it through to the version you get with pip install. Add it in yourself and it should work.