Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Python SQLAlchemy Basics Introduction to SQLAlchemy Creating a Movie Model

The verification regex is error

AssertionError: Regex didn't match: 'engine\s*=\s*create_engine\(\r?\n?\\'?\"?\‘?sqlite\:\/\/\/movies\.db\\'?\"?\’?\s*\,\s*\r?\n?echo\=False\s*\)' not found in "# insert your code here\nfrom sqlalchemy import create_engine\nfrom sqlalchemy.ext.declarative import declarative_base\n\nengine = create_engine('sqlite:///movies.db', echo = False)\n\nBase = declarative_base()\n\nclass Movie(Base):\n tablename = 'movies'" :

I may right but the assert return error due to has the special characters in it "’?"

models.py
# insert your code here
from sqlalchemy import create_engine
from sqlalchemy.ext.declarative import declarative_base

engine = create_engine('sqlite:///movies.db', echo = False)

Base = declarative_base()

class Movie(Base):
    __tablename__ = 'movies'

1 Answer

Steven Parker
Steven Parker
231,268 Points

Apparently, the challenge doesn't like white space where the echo term is set. Try it this way instead:

engine = create_engine('sqlite:///movies.db', echo=False)

Still not work. I found that the website use ‘ character but when I type in the keyboard it is ' Please see ' and ‘

Thank you Steven Parker . I quit the browser then restart and seem it worked. You should not use regex for this @treehouse