rduplain / sched Goto Github PK
View Code? Open in Web Editor NEWSource code for Flask Web Development book (Packt 2013).
Home Page: http://www.packtpub.com/flask-web-development/book
Source code for Flask Web Development book (Packt 2013).
Home Page: http://www.packtpub.com/flask-web-development/book
I created a virtual environment via python3 -m venv build
and activated. After that I followed the directions in README.rst which raised a sqlalchemy.exc.StatementError
when committing the new User.
(build) code_m@catuvm:/tmp/sched [master=]$ pip install -r stable.txt
{{context omitted.}}
(build) code_m@catuvm:/tmp/sched [master=]$ python manage.py create_tables
(build) code_m@catuvm:/tmp/sched [master=]$ python manage.py shell
>>> from sched.app import db, User
>>> user = User(email='[email protected]', password='secret')
>>> db.session.add(user)
>>> db.session.commit()
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "/tmp/sched/build/lib/python3.4/site-packages/sqlalchemy/orm/scoping.py", line 149, in do
return getattr(self.registry(), name)(*args, **kwargs)
File "/tmp/sched/build/lib/python3.4/site-packages/sqlalchemy/orm/session.py", line 721, in commit
self.transaction.commit()
File "/tmp/sched/build/lib/python3.4/site-packages/sqlalchemy/orm/session.py", line 354, in commit
self._prepare_impl()
File "/tmp/sched/build/lib/python3.4/site-packages/sqlalchemy/orm/session.py", line 334, in _prepare_impl
self.session.flush()
File "/tmp/sched/build/lib/python3.4/site-packages/sqlalchemy/orm/session.py", line 1818, in flush
self._flush(objects)
File "/tmp/sched/build/lib/python3.4/site-packages/sqlalchemy/orm/session.py", line 1936, in _flush
transaction.rollback(_capture_exception=True)
File "/tmp/sched/build/lib/python3.4/site-packages/sqlalchemy/util/langhelpers.py", line 60, in __exit__
compat.reraise(exc_type, exc_value, exc_tb)
File "/tmp/sched/build/lib/python3.4/site-packages/sqlalchemy/util/compat.py", line 183, in reraise
raise value
File "/tmp/sched/build/lib/python3.4/site-packages/sqlalchemy/orm/session.py", line 1900, in _flush
flush_context.execute()
File "/tmp/sched/build/lib/python3.4/site-packages/sqlalchemy/orm/unitofwork.py", line 372, in execute
rec.execute(self)
File "/tmp/sched/build/lib/python3.4/site-packages/sqlalchemy/orm/unitofwork.py", line 525, in execute
uow
File "/tmp/sched/build/lib/python3.4/site-packages/sqlalchemy/orm/persistence.py", line 64, in save_obj
table, insert)
File "/tmp/sched/build/lib/python3.4/site-packages/sqlalchemy/orm/persistence.py", line 569, in _emit_insert_statements
execute(statement, params)
File "/tmp/sched/build/lib/python3.4/site-packages/sqlalchemy/engine/base.py", line 662, in execute
params)
File "/tmp/sched/build/lib/python3.4/site-packages/sqlalchemy/engine/base.py", line 761, in _execute_clauseelement
compiled_sql, distilled_params
File "/tmp/sched/build/lib/python3.4/site-packages/sqlalchemy/engine/base.py", line 828, in _execute_context
None, None)
File "/tmp/sched/build/lib/python3.4/site-packages/sqlalchemy/engine/base.py", line 1024, in _handle_dbapi_exception
exc_info
File "/tmp/sched/build/lib/python3.4/site-packages/sqlalchemy/util/compat.py", line 187, in raise_from_cause
reraise(type(exception), exception, tb=exc_tb, cause=exc_value)
File "/tmp/sched/build/lib/python3.4/site-packages/sqlalchemy/util/compat.py", line 182, in reraise
raise value.with_traceback(tb)
File "/tmp/sched/build/lib/python3.4/site-packages/sqlalchemy/engine/base.py", line 824, in _execute_context
context = constructor(dialect, self, conn, *args)
File "/tmp/sched/build/lib/python3.4/site-packages/sqlalchemy/engine/default.py", line 448, in _init_compiled
self.__process_defaults()
File "/tmp/sched/build/lib/python3.4/site-packages/sqlalchemy/engine/default.py", line 823, in __process_defaults
val = self.get_insert_default(c)
File "/tmp/sched/build/lib/python3.4/site-packages/sqlalchemy/engine/default.py", line 779, in get_insert_default
return self._exec_default(column.default, column.type)
File "/tmp/sched/build/lib/python3.4/site-packages/sqlalchemy/engine/default.py", line 765, in _exec_default
return default.arg(self)
sqlalchemy.exc.StatementError: tzinfo argument must be None or of a tzinfo subclass, not type 'SQLiteExecutionContext' (original cause: TypeError: tzinfo argument must be None or of a tzinfo subclass, not type 'SQLiteExecutionContext') 'INSERT INTO user (created, modified, name, email, active, password) VALUES (?, ?, ?, ?, ?, ?)' [{'password': 'pbkdf2:sha1:1000$RkuYC8b0$9914da53aa9f0e90766e2db4de6d88eb2040f5c1', 'email': '[email protected]', 'name': None}]
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.