ImportError: No module named BeautifulSoup

On 26 August 2011, in IT, by David

Had this issue when you’ve been trying to run something like Funnelweb, and you hit an ImportError for BeautifulSoup?  You’re definitely not alone, because I just hit the same issue.  The answer is simple — just ensure that you don’t use BeautifulSoup 4 or above (this is still beta) — it uses a different namespace, specifically bs4.  Thus, whilst you might have the BeautifulSoup egg satisfying your dependencies, any imports of this package are going to fail.

For me, I’m using buildout, so I just pinned my version of BeautifulSoup thusly:


[buildout]
...
versions = versions

[versions]
BeautifulSoup = 3.2.0

Now, we stop using BeautifulSoup 4.0 and everything works again.

Tagged with:
 

Update: You should check out wildcard.fixpersistentutilities – it’s a fantastic solution to problems like this.  Many thanks to Nathan Van Gheem, the author of the add on.  Check out the link and see how to install it (temporarily) on your Plone instance that needs its site manager cleaned up.

Leftovers are typically useful when they’re in your fridge at home. They mean you don’t have to mess around making lunch for the next day for work, and can just grab them, and walk right out the door. Now, leftovers in the zope.component SiteManager aren’t so nice, especially when some Plone products fail to remove what they’ve registered. The consequences of this are that you’ve got references left which will break things when you uninstall/remove the physical eggs/files. These leftovers would be ones would be mutated food that comes to kill you after you’ve thrown it in the bin, assuming we follow the same analogy. But how to fix them?

Continue reading »

Tagged with:
 

Ever the issue-magnet, I’ve spent the better part of my morning trying to debug a mistmatched tag error from within some ZCML (aka XML for the non-initiated).  Essentially, the issue boiled down to the system telling me that it was certain that I had a mistmatched tag within my configuration, and presented me with the problematic XML tag (complete with line numbers).  However, life’s not always that simple.

Continue reading »

Tagged with:
 

Here’s an interesting error message I got stumped with for a good set of hours.  The issue started with me using collective.autoreload with Plone and it does the trick, mostly.  With any such ‘operation’ and live reloading of code for Python, you’ve got to expect that not everything will go according to plan.  Most things do, but one issue I found presented with this error message:

Continue reading »

Tagged with:
 

Buildout: Trying to create a Plone/Zope instance

On 11 February 2009, in IT, Linux, Work, by David

Eeek…what’s this mean?

install() got an unexpected keyword argument 'allow_hosts'

after trying to build zope2zeoserver from my buildout configuration.

Continue reading »

Tagged with: