[Sqlalchemy-tickets] Issue #3648: Documentation: error in SQL Expression Language tutorial(?) (zzze
Brought to you by:
zzzeek
From: Joakim N. <iss...@bi...> - 2016-02-14 17:20:35
|
New issue 3648: Documentation: error in SQL Expression Language tutorial(?) https://bitbucket.org/zzzeek/sqlalchemy/issues/3648/documentation-error-in-sql-expression Joakim Nybäck: Hi, I followed the SQLAlchemy SQL Expression Language tutorial from the beginning. I added the code as I went along, including the code for creating the two tables in the section "**Define and Create Tables**" (section 3.1.3 in the PDF version; the PDF is for Release 1.1.0b1 and dated 13-FEB-2016). When I execute the code an exception is thrown: "UnboundExecutionError: MetaData object is not bound to an Engine or Connection. Execution can not proceed without a database to execute against." The code listed in the tutorial includes this line: ``` #!python metadata = MetaData() ``` If I change that line to: ``` #!python metadata = MetaData(bind=engine) ``` then the code works fine. |