Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Python Using Databases in Python Meet Peewee Modeling

Gilang Ilhami
Gilang Ilhami
12,045 Points

SqliteDatabase has not attribute 'connect'

I got an error when i tried to run the code

treehouse:~/workspace$ python students.py                                                        
Traceback (most recent call last):                                                               
  File "students.py", line 13, in <module>                                                       
    db.connnect()                                                                                
AttributeError: 'SqliteDatabase' object has no attribute 'connnect'                              

2 Answers

Umesh Ravji
Umesh Ravji
42,362 Points

You have an extra n in connect?

Jennifer Nordell
seal-mask
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

Hi! I'm changing your comment to an answer to allow the original poster to select you for "Best Answer" if they so desire. Thanks for helping out in the Community! :sparkles:

Jennifer Nordell
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

Hi there! I got your request to answer this question, but I see Umesh Ravji has provided one!. Your connnect should be connect. You should correct the spelling on line 13 in students.py.

Good luck! :sparkles: