<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">As it turns out, I messed up.&nbsp;TotalStoreSales &nbsp;was returning as a integer, not a list. Which lead me to other issues with the script in question.<div><br></div><div>Doh!</div><div><br></div><div>Sorry about that and thanks!</div><div><br></div><div><div><div>On Sep 3, 2008, at 4:37 PM, Kent Johnson wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>On Wed, Sep 3, 2008 at 3:44 PM, Rilindo Foster &lt;<a href="mailto:webmaster@monzell.com">webmaster@monzell.com</a>> wrote:<br><blockquote type="cite">Hi! Long time reader, first time poster (I think).<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">I am trying to do a comparison on a particular list item. The list in<br></blockquote><blockquote type="cite">question comes in this pair:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">TotalStoreSales = Revenues + "," + Orders<br></blockquote><blockquote type="cite">TotalStoreSales = TotalStoreSales.split(",")<br></blockquote><br>These two lines could be just<br>TotalStoreSales = [Revenues, Orders]<br><br><blockquote type="cite">At this point, it has two values, both strings.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Then I attempt to do a comparison like so:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">if (float(TotalStoreSales[0]) > 0):<br></blockquote><blockquote type="cite"> &nbsp;&nbsp;(does stuff)<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">I know that it is converting into a float - that I verified.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">At any event, it keeps returning with this:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Traceback (most recent call last):<br></blockquote><blockquote type="cite"> File "./getMivaStoreTransactions.py", line 143, in ?<br></blockquote><blockquote type="cite"> &nbsp;&nbsp;TotalSales = TotalSales + getStoreStats(d[0],AllSales)<br></blockquote><blockquote type="cite"> File "./getMivaStoreTransactions.py", line 120, in getStoreStats<br></blockquote><blockquote type="cite"> &nbsp;&nbsp;if (float(TotalStoreSales[0]) > 0):<br></blockquote><blockquote type="cite">TypeError: unsubscriptable object<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Maybe I am missing something someplace. Help?<br></blockquote><br>Is anything else happening between these two snippets? Try putting<br> &nbsp;print type(TotalStoreSales), TotalStoreSales<br>before the if statement.<br><br>Kent<br></div></blockquote></div><br></div></body></html>