aiwarrior <[EMAIL PROTECTED]> wrote:
>
>I'm sorry about not saying showing the libraries. It was not on
>purpose.

You didn't make any comment on the rest of Gerhard's suggestion, nor does
it appear that you took any action to correct them.

You should get out of the habit of using extra parentheses in "if" and
"print" statements.  They are not needed in Python, and they make the code
more difficult to read.

>            self.cursor.execute( "CREATE TABLE database
>(album,filepath)" )

Note the order of the fields: album, then path.

>    def add_entry( self, eone , etwo ): #Add entry to database
>        self.cursor.execute( "INSERT INTO database (album,filepath)
>VALUES (?,?)", ( eone , etwo ) )
>        return 1 #TODO: exception handler

Again note the order of the fields here: album, then path.

>    def get_value( self, column ):
>        self.cursor.execute( "SELECT %s FROM database" % column )
>        for n in self.cursor:
>             print n

I suspect you wanted "self.cursor.fetchall()" there, but since you don't
call it, it doesn't matter yet.

>                    db.add_entry( joined, audio['album'] )

Now note the order that you supply the fields: path first, album second.
You are inserting the fields in the wrong order here.

>This is all the code. Some of that try pass code is just something i
>glued to create a clean slate database file

And such gluing is a very bad idea, because it is apparently hiding the
real cause of your problems.  Get rid of the try/except/pass sequences
until you understand what is failing.
-- 
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to