3M3RY/rdnormalize — Issue #2: Column 'LOUDNESS_TARGET' in where clause is ambiguous, line 94
Author: danielbair
Created: 2012-02-12 18:48:57+00:00
State: open

Traceback (most recent call last):
File "/usr/local/sbin/rdnormalize.py", line 190, in
main(LkTarget, args)
File "/usr/local/sbin/rdnormalize.py", line 138, in main
for row in db.unanalyzedCuts(args.group, LkTarget):
File "/usr/local/sbin/rdnormalize.py", line 94, in unanalyzedCuts
""", (group, LkTarget))
File "/usr/lib/pymodules/python2.7/MySQLdb/cursors.py", line 166, in execute
self.errorhandler(self, exc, value)
File "/usr/lib/pymodules/python2.7/MySQLdb/connections.py", line 35, in defaulterrorhandler
raise errorclass, errorvalue
_mysql_exceptions.OperationalError: (1052, "Column 'LOUDNESS_TARGET' in where clause is ambiguous")

This fix worked for me...

self.cursor.execute("""select CUT_NAME from CUTS left join CART
on (CART.NUMBER=CUTS.CART_NUMBER)
where GROUP_NAME = %s
and (CUTS.LOUDNESS_TARGET is null
or CUTS.LOUDNESS_TARGET != %s)
""", (group, LkTarget))