None on Linux but found on Windows

Bug #1452067 reported by Nicolas
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Beautiful Soup
Invalid
Undecided
Unassigned

Bug Description

Hi

I use beautifulsoup4==4.3.2 on Windows Seven and on Linux.
On Windows I have Python 2.7.8 and on Linux I have 2.7.6. I spent 30 minutes, trying to install python 2.7.8 or latest version of Python on Ubuntu but I couldn't...

My script parses a html page. The element is found on Windows, but isn't found on Linux (return None). This bug is quite rare. The script works with lots of pages but with about 5% of the pages..it doesn't work.

from bs4 import BeautifulSoup
f = open('page.html','r')
html = f.read()
f.close()
soup = BeautifulSoup(html)
print soup.find('div', id='BidsHistory1')

The html :
...
...
 <a name="QuestionsAndAnswers1"></a>
</ul>
            </div>
            <div class="AI_slide" id="it_ctrl_Bids">
                <div id="BidsHistory1" class="it_bidsControl">
 <table class="it_offer_table">
...
...

Thank you

Revision history for this message
Nicolas (nico128) wrote :
Revision history for this message
Nicolas (nico128) wrote :
Revision history for this message
Leonard Richardson (leonardr) wrote :

"If your script works on one computer but not another, it’s probably because the two computers have different parser libraries available. For example, you may have developed the script on a computer that has lxml installed, and then tried to run it on a computer that only has html5lib installed."

http://www.crummy.com/software/BeautifulSoup/bs4/doc/#other-parser-problems

If this does not describe your problem, please reopen this bug and mention which parser you are using to parse the page.

Changed in beautifulsoup:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.