Last active
December 28, 2015 08:09
-
-
Save 3onyc/7469546 to your computer and use it in GitHub Desktop.
SQLAlchemy Issue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE "test" ( | |
"date" datetime | |
); | |
INSERT INTO test VALUES(1384008289278); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from sqlalchemy import create_engine | |
from sqlalchemy.schema import MetaData, Table | |
engine = create_engine('sqlite:///test.db', echo=False) | |
metadata = MetaData() | |
metadata.reflect(bind=engine) | |
print engine.execute(metadata.sorted_tables[0].select()).fetchall() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Traceback (most recent call last): | |
File "test.py", line 8, in <module> | |
print engine.execute(metadata.sorted_tables[0].select()).fetchall() | |
File "build/bdist.linux-x86_64/egg/sqlalchemy/engine/result.py", line 135, in __repr__ | |
ValueError: Couldn't parse datetime string '1384008289278' - value is not a string. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://gist.github.com/zzzeek/7470863