[Python] Unsupported Format Character '&' (0x26)

Chris Gonnerman chris.gonnerman at newcenturycomputers.net
Thu Aug 19 14:30:03 CEST 2010


On 08/18/2010 06:35 PM, Andrew Evans wrote:
> I get an error message "Unsupported Format Character '&' (0x26)" I 
> narrowed it down to these two variables
>
> any idea how to fix it?
>
>   SEARCH_URL_0 = 
> "http://search.yahoo.com/search;_ylt=A0oGdEf1XGxMJRoAUdml87UF;_ylc=X1MDMjE0MjQ3ODk0OARfcgMyBGZyA3NmcARuX2dwcwMxMARvcmlnaW4Dc3ljBHF1ZXJ5A3Rlc3QEc2FvAzE-?p=%(query)&fr=sfp&fr2=&iscqry= 
> <http://search.yahoo.com/search;_ylt=A0oGdEf1XGxMJRoAUdml87UF;_ylc=X1MDMjE0MjQ3ODk0OARfcgMyBGZyA3NmcARuX2dwcwMxMARvcmlnaW4Dc3ljBHF1ZXJ5A3Rlc3QEc2FvAzE-?p=%%28query%29&fr=sfp&fr2=&iscqry=>"
>     NEXT_PAGE_0 = 
> "http://search.yahoo.com/search;_ylt=A0oGdEEMXWxMnBAAiWhXNyoA?p=%(query)&fr=sfp&xargs=12KPjg1qNyy4-MkfqnfKqLCLLAhlMFta2E&pstart=%(start)&b=11 
> <http://search.yahoo.com/search;_ylt=A0oGdEEMXWxMnBAAiWhXNyoA?p=%%28query%29&fr=sfp&xargs=12KPjg1qNyy4-MkfqnfKqLCLLAhlMFta2E&pstart=%%28start%29&b=11>"
>
Not %(query)

Should be %(query)s

The 's' means "string."

-- Chris.



More information about the Python-list mailing list