uusDBHelper.py crashes in line 363, SQL syntax error.

Bug #299247 reported by Alex Stoppel
2
Affects Status Importance Assigned to Milestone
Ubuntu Update Server
Fix Released
High
Cameron Webb

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')

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

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')
>

Revision history for this message
Alex Stoppel (stopal01) wrote :
Download full text (4.8 KiB)

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 a...

Read more...

Revision history for this message
Cameron Webb (cameron-webb) wrote :
Download full text (6.5 KiB)

I tried a machine in the 3rd floor lab and it broke like you
said...yay..... Sort of

On 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.p...

Read more...

Revision history for this message
Cameron Webb (cameron-webb) wrote :
Download full text (6.9 KiB)

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/uusDBC...

Read more...

Revision history for this message
Cameron Webb (cameron-webb) wrote :

See revision 51 for a description.

Changed in luther-ubuntu-update-server:
assignee: nobody → cameron-webb
importance: Undecided → High
status: New → Fix Committed
Revision history for this message
Cameron Webb (cameron-webb) wrote :

and when i said i'm going to string, i mean split.

Revision history for this message
Cameron Webb (cameron-webb) wrote :

correct, revision 52 fixed it.

added removeDoubQuotes function to remove quotes from description. changed variable names "string" to "value"

Changed in luther-ubuntu-update-server:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.