Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to run the test suite #66

Closed
gregnavis opened this issue Jan 17, 2014 · 1 comment
Closed

Unable to run the test suite #66

gregnavis opened this issue Jan 17, 2014 · 1 comment

Comments

@gregnavis
Copy link
Contributor

After running python setup.py test -s test all the tests fail. I get the same stack trace in all test cases:

ERROR: test_upsert_all_key (test.test_persistence.TableTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/grn/p/dataset/test/test_persistence.py", line 125, in setUp
    self.tbl.insert(row)
  File "/home/grn/p/dataset/dataset/persistence/table.py", line 74, in insert
    res = self.database.executable.execute(self.table.insert(row))
  File "/home/grn/.virtualenvs/dataset/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1598, in execute
    return connection.execute(statement, *multiparams, **params)
  File "/home/grn/.virtualenvs/dataset/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 664, in execute
    return meth(self, multiparams, params)
  File "/home/grn/.virtualenvs/dataset/local/lib/python2.7/site-packages/sqlalchemy/sql/elements.py", line 282, in _execute_on_connection
    return connection._execute_clauseelement(self, multiparams, params)
  File "/home/grn/.virtualenvs/dataset/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 761, in _execute_clauseelement
    compiled_sql, distilled_params
  File "/home/grn/.virtualenvs/dataset/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 828, in _execute_context
    None, None)
  File "/home/grn/.virtualenvs/dataset/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1023, in _handle_dbapi_exception
    exc_info
  File "/home/grn/.virtualenvs/dataset/local/lib/python2.7/site-packages/sqlalchemy/util/compat.py", line 185, in raise_from_cause
    reraise(type(exception), exception, tb=exc_tb)
  File "/home/grn/.virtualenvs/dataset/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 824, in _execute_context
    context = constructor(dialect, self, conn, *args)
  File "/home/grn/.virtualenvs/dataset/local/lib/python2.7/site-packages/sqlalchemy/engine/default.py", line 525, in _init_compiled
    param.append(processors[key](compiled_params[key]))
  File "/home/grn/.virtualenvs/dataset/local/lib/python2.7/site-packages/sqlalchemy/sql/type_api.py", line 853, in process
    return process_param(value, dialect)
  File "/home/grn/p/dataset/dataset/persistence/util.py", line 67, in process_bind_param
    return (value / 1000 - self.epoch).total_seconds()
StatementError: unsupported operand type(s) for /: 'datetime.datetime' and 'int' (original cause: TypeError: unsupported operand type(s) for /: 'datetime.datetime' and 'int') u'INSERT INTO weather (date, place, temperature) VALUES (?, ?, ?)' []

I saw an old issue related to SQLite and datetime that introduced a fix for this database. Interestingly the tests almost pass after commenting out the fix - the test test_find hangs up.

I'm on Debian Jessie (+ backports), Python 2.7.6, SQLite 3.8.2, SQLAlchemy 0.9.1.

@gregnavis
Copy link
Contributor Author

The issue is fixed in f254e03. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant