Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Parser variations
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  1 message - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Bruce Eckel  
View profile  
 More options Apr 10 2012, 2:36 pm
From: Bruce Eckel <brucetec...@gmail.com>
Date: Tue, 10 Apr 2012 12:36:16 -0600
Local: Tues, Apr 10 2012 2:36 pm
Subject: Parser variations

I just had an experience I thought I'd share to prevent others from the
same bug.

I have a Windows 7 desktop and a MacBook. I've done most of the development
on the Win7 machine, but I'm traveling so switched to the MacBook. I've
done a lot to isolate the differences between the two, but when I switched
over to the MacBook I discovered that I'd get to a phase of processing
where most of my document just vanished. I attributed this to Mac/Win
differences and tried to figure it out that way but after sleeping on it
realized that I hadn't installed lxml on the MacBook so the system was
quietly falling back to a different parser, and the behavior between
parsers was so different that I was getting completely different results.

Fixed it by specifying "lxml" as the second BeautifulSoup constructor
argument, so now when my system tries to build without lxml it puts out an
appropriate error message.

The parser fallback behavior sounds like a good idea at first but since the
behavior is so different I highly recommend specifying whatever parser
you're using via the constructor, so if you move your program to a machine
that doesn't have it you get a hint about what's wring.

-- Bruce Eckel
www.Reinventing-Business.com
www.MindviewInc.com


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »