TypeError

r0g aioe.org at technicalbloke.com
Thu Jan 7 00:24:52 CET 2010


MRAB wrote:
> Victor Subervi wrote:
>> Hi;
>> I get this error:
>>
>>  /var/www/html/angrynates.com/christians/cart/simplemail/mail.py
>> <http://angrynates.com/christians/cart/simplemail/mail.py>
>>   153 </head>
>>   154 <body>'''
>>   155 commitSale()
>>   156 myMail()
>>   157 print '''
>> commitSale = <function commitSale>
>>  /var/www/html/angrynates.com/christians/cart/simplemail/mail.py
>> <http://angrynates.com/christians/cart/simplemail/mail.py> in
>> commitSale()
>>    98     cursor.execute('select max(ID) from %sCustomerData;' % store)
>>    99     custID = cursor.fetchone()[0]
>>   100   customerData(store, tmpTable, custID, patientID)
>>   101
>>   102 def myMail():
>> global customerData = <function customerData>, global store =
>> 'products', tmpTable = 'tem12627568064', custID = 1, global patientID
>> = 'None'
>>  /var/www/html/angrynates.com/christians/cart/customerData.py
>> <http://angrynates.com/christians/cart/customerData.py> in
>> customerData(store='products', tmpTable='tem12627568064', custID=1,
>> patientID='None')
>>    39 <body>
>>    40 """
>>    41   print """
>>    42   print '<h1 align="center">%s Customer Data</h1>' %
>> (store[0].upper() + store[1:])
>>    43   cursor.execute('describe %sCustomerData' % store)
>> store = 'products'
>>
>> ValueError: unsupported format character '(' (0x28) at index 54
>>       args = ("unsupported format character '(' (0x28) at index 54",)
>>
>> Apparently that character is a "file separator", which I presume is an
>> invisible character. I tried retyping the area in question, but with
>> no avail (threw same error). Please advise. Complete code follows.
>>
> Please provide the actual code (and, preferably, an easier-to-understand
> traceback, like what CPython does!). What you supplied isn't runnable.



Oh and, it's probably not a good idea to post things that identify the
site you're working on, especially if you're fairly new to programming
and you're doing a shopping cart! Hackers have been known to trawl
google looking for mention of novice coders websites, giving them domain
names, internal paths, table names etc might well help them hack you!

Cheers & good luck,

Roger.



More information about the Python-list mailing list