Comment 4 for bug 299247

Revision history for this message
Cameron Webb (cameron-webb) wrote : Re: [Bug 299247] [NEW] uusDBHelper.py crashes in line 363, SQL syntax error.

The issue is with quotes. we're putting double quotes (") around a string
that contains these double quotes(")

I'm going to string the quotes in the description, as they are not
necessary. single quotes don't work because, well, there are words like
"don't" and "Debian's".

I wrote a function to handle this... should be committed with in the next 5
minutes.

Cam

On Mon, Nov 17, 2008 at 8:38 PM, Alex Stoppel <email address hidden> wrote:

> I'm running 2.5.2, I just tried it again and got the same problem, unless
> the MySQLdb that i downloaded is different from the one you guys have?
> Thats
> the only other difference I can think of, I downloaded the python mysqldb
> package from ubuntu, so I'd think it'd be the same.
>
> Alex
>
> On Mon, Nov 17, 2008 at 7:53 PM, Cameron Webb <email address hidden>
> wrote:
>
> > Random question:
> >
> > what version of python are you running?
> >
> > I can't recreate the problem. The main program just says "Loading..."
> over
> > and over a bunch.
> >
> >
> > On Mon, Nov 17, 2008 at 4:40 PM, Alex Stoppel <email address hidden>
> > wrote:
> >
> > > Public bug reported:
> > >
> > > File "/home/alex/CS/seniorproject/devel/backend/main.py", line 6, in
> main
> > > updateList = serv.getAvailableUpdates()
> > > File "/home/alex/CS/seniorproject/devel/backend/UbuntuUpdate.py", line
> > 38,
> > > in getAvailableUpdates
> > > dbResult = self.dbConn.addPackage(package,self.machID)
> > > File "/home/alex/CS/seniorproject/devel/database/uusDBConnector.py",
> > line
> > > 31, in addPackage
> > > result = self.helper.addPackage(package)
> > > File "/home/alex/CS/seniorproject/devel/database/uusDBHelper.py", line
> > > 363, in addPackage
> > > self.cursor.execute("insert into package %s values %s;"%(columns,
> > > values))
> > > File "/var/lib/python-support/python2.5/MySQLdb/cursors.py", line 166,
> > in
> > > execute
> > > self.errorhandler(self, exc, value)
> > > File "/var/lib/python-support/python2.5/MySQLdb/connections.py", line
> > 35,
> > > in defaulterrorhandler
> > > raise errorclass, errorvalue
> > > ProgrammingError: (1064, 'You have an error in your SQL syntax; check
> the
> > > manual that corresponds to your MySQL server version for the right
> syntax
> > to
> > > use near \'Common UNIX Printing System" and "CUPS" are trademarks of
> > Easy\n
> > > Software Product\' at line 1')
> > >
> > > ** Affects: luther-ubuntu-update-server
> > > Importance: Undecided
> > > Status: New
> > >
> > > --
> > > uusDBHelper.py crashes in line 363, SQL syntax error.
> > > https://bugs.launchpad.net/bugs/299247
> > > You received this bug notification because you are a member of Luther
> > > College Seniors, which is subscribed to Ubuntu Update Server.
> > >
> > > Status in Ubuntu Update Server: New
> > >
> > > Bug description:
> > > File "/home/alex/CS/seniorproject/devel/backend/main.py", line 6, in
> main
> > > updateList = serv.getAvailableUpdates()
> > > File "/home/alex/CS/seniorproject/devel/backend/UbuntuUpdate.py", line
> > 38,
> > > in getAvailableUpdates
> > > dbResult = self.dbConn.addPackage(package,self.machID)
> > > File "/home/alex/CS/seniorproject/devel/database/uusDBConnector.py",
> > line
> > > 31, in addPackage
> > > result = self.helper.addPackage(package)
> > > File "/home/alex/CS/seniorproject/devel/database/uusDBHelper.py", line
> > > 363, in addPackage
> > > self.cursor.execute("insert into package %s values %s;"%(columns,
> > > values))
> > > File "/var/lib/python-support/python2.5/MySQLdb/cursors.py", line 166,
> > in
> > > execute
> > > self.errorhandler(self, exc, value)
> > > File "/var/lib/python-support/python2.5/MySQLdb/connections.py", line
> > 35,
> > > in defaulterrorhandler
> > > raise errorclass, errorvalue
> > > ProgrammingError: (1064, 'You have an error in your SQL syntax; check
> the
> > > manual that corresponds to your MySQL server version for the right
> syntax
> > to
> > > use near \'Common UNIX Printing System" and "CUPS" are trademarks of
> > Easy\n
> > > Software Product\' at line 1')
> > >
> >
> > --
> > uusDBHelper.py crashes in line 363, SQL syntax error.
> > https://bugs.launchpad.net/bugs/299247
> > You received this bug notification because you are a member of Luther
> > College Seniors, which is subscribed to Ubuntu Update Server.
> >
> > Status in Ubuntu Update Server: New
> >
> > Bug description:
> > File "/home/alex/CS/seniorproject/devel/backend/main.py", line 6, in main
> > updateList = serv.getAvailableUpdates()
> > File "/home/alex/CS/seniorproject/devel/backend/UbuntuUpdate.py", line
> 38,
> > in getAvailableUpdates
> > dbResult = self.dbConn.addPackage(package,self.machID)
> > File "/home/alex/CS/seniorproject/devel/database/uusDBConnector.py",
> line
> > 31, in addPackage
> > result = self.helper.addPackage(package)
> > File "/home/alex/CS/seniorproject/devel/database/uusDBHelper.py", line
> > 363, in addPackage
> > self.cursor.execute("insert into package %s values %s;"%(columns,
> > values))
> > File "/var/lib/python-support/python2.5/MySQLdb/cursors.py", line 166,
> in
> > execute
> > self.errorhandler(self, exc, value)
> > File "/var/lib/python-support/python2.5/MySQLdb/connections.py", line
> 35,
> > in defaulterrorhandler
> > raise errorclass, errorvalue
> > ProgrammingError: (1064, 'You have an error in your SQL syntax; check the
> > manual that corresponds to your MySQL server version for the right syntax
> to
> > use near \'Common UNIX Printing System" and "CUPS" are trademarks of
> Easy\n
> > Software Product\' at line 1')
> >
>
> --
> uusDBHelper.py crashes in line 363, SQL syntax error.
> https://bugs.launchpad.net/bugs/299247
> You received this bug notification because you are a member of Luther
> College Seniors, which is subscribed to Ubuntu Update Server.
>
> Status in Ubuntu Update Server: New
>
> Bug description:
> File "/home/alex/CS/seniorproject/devel/backend/main.py", line 6, in main
> updateList = serv.getAvailableUpdates()
> File "/home/alex/CS/seniorproject/devel/backend/UbuntuUpdate.py", line 38,
> in getAvailableUpdates
> dbResult = self.dbConn.addPackage(package,self.machID)
> File "/home/alex/CS/seniorproject/devel/database/uusDBConnector.py", line
> 31, in addPackage
> result = self.helper.addPackage(package)
> File "/home/alex/CS/seniorproject/devel/database/uusDBHelper.py", line
> 363, in addPackage
> self.cursor.execute("insert into package %s values %s;"%(columns,
> values))
> File "/var/lib/python-support/python2.5/MySQLdb/cursors.py", line 166, in
> execute
> self.errorhandler(self, exc, value)
> File "/var/lib/python-support/python2.5/MySQLdb/connections.py", line 35,
> in defaulterrorhandler
> raise errorclass, errorvalue
> ProgrammingError: (1064, 'You have an error in your SQL syntax; check the
> manual that corresponds to your MySQL server version for the right syntax to
> use near \'Common UNIX Printing System" and "CUPS" are trademarks of Easy\n
> Software Product\' at line 1')
>