Python - Error Parsing HTML w/ BeautifulSoup
<p>I'm developing an app that inputs data onto a webpage shopping cart and verifies the total. That works fine, however, I am having issue with parsing the HTML output.</p>

<p>A previous discussion; <a href="http://stackoverflow.com/questions/5315856/retrieving-essential-data-from-a-webpage-using-python">retrieving essential data from a webpage using python.</a>, recommended using BeautifulSoup to make solve said user's problem. </p>

<p>I've borrowed some of the python code, and got it to work on a MacOS system. However when I copied the code over to an ubuntu installation, I'm seeing a strange error.</p>

<p>**The Code (where I'm seeing the issue):</p>

<pre><code>response = opener.open(req)
html = response.read()
doc = BeautifulSoup.BeautifulSoup(html)

table = doc.find('tr', {'id':'carttablerow0'})

dump = [cell.getText().strip() for cell in table.findAll('td')]

print "\n Catalog Number: %s \n Description: %s \n Price: %s\n" %(dump[0], dump[1], dump[5])
</code></pre>

<p>**The Error ( on the ubuntu server)</p>

<pre><code>    Traceback (most recent call last):
      File "./shopping_cart_checker.py", line 49, in &lt;module&gt;
        dump = [cell.getText().strip() for cell in table.findAll('td')]
    TypeError: 'NoneType' object is not callable
</code></pre>

<p>I think I've narrowed it down to getText() being the culprit. But I'm not certain why this works on MacOS and not ubuntu.</p>

<p>Any suggestions?</p>

<p>Thank you.</p>

<p>@@@@@@@@@@@@@@@@@@@@@@@@@</p>

<p>Hi Guys,</p>

<p>Thank you for the various suggestions. I've attempted most of them, (incorporating the "if cell" statement into the code, however it still isn't working. </p>

<p>@ Ignacio Vazquez-Abrams -- Here's a copy of the HTML I'm attempting to strip:</p>

<p><a href="http://pastebin.com/WdaeExnC" rel="nofollow">http://pastebin.com/WdaeExnC</a></p>
