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 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,386 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: