question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

'Document' object has no attribute 'findall'

See original GitHub issue

After upgrading ubuntu 13.10 to 14.04. All packages that I am trying to install is getting the following error:

Exception: Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in main
  status = self.run(options, args)
File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 278, in run
  requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle) 
File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1177, in prepare_files 
  url = finder.find_requirement(req_to_install, upgrade=self.upgrade) 
File "/usr/lib/python2.7/dist-packages/pip/index.py", line 256, in find_requirement
  page_versions.extend(self._package_versions(page.links, req.name.lower())) 
File "/usr/lib/python2.7/dist-packages/pip/index.py", line 432, in _package_versions 
  for link in self._sort_links(links): 
File "/usr/lib/python2.7/dist-packages/pip/index.py", line 422, in _sort_links 
  for link in links: 
File "/usr/lib/python2.7/dist-packages/pip/index.py", line 769, in links 
  for anchor in self.parsed.findall(".//a"):
AttributeError: 'Document' object has no attribute 'findall'

Storing debug log for failure in /root/.pip/pip.log

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:33 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
dstufftcommented, May 26, 2014

Ah I see.

So pip itself bundles some software, html5lib being one of those, on various Linux distros they unbundle that software and cause pip to import it normally instead of using it’s own bundled copy.

What this means is that if you install an incompatible version of one of pip’s dependencies into the global Python, then you’ll break pip because pip will import that and attempt to use that instead of the correct one installed by apt-get.

0reactions
kuroyukicommented, Feb 25, 2016

Seems the issue was fixed in the latest Pip version but apt-get has old one. I installed pip from pypa.io wget https://bootstrap.pypa.io/get-pip.py python get-pip.py And updated to latest version with : sudo pip install --upgrade pip Now I able to install packages w/o problems.

Read more comments on GitHub >

github_iconTop Results From Across the Web

AttributeError: 'Element' object has no attribute 'findAll'
ElementTree Element objects indeed have no findAll() method. The correct method to use is Element.findall() , all lowercase.
Read more >
Why do I get this error 'attributeerror: module 're' has no ...
AttributeError: 'int' object has no attribute 'lower' which means integer cannot be lower-cased. Somewhere in your code, it tries to lower case integer...
Read more >
xml.etree.ElementTree — The ElementTree XML API ...
Tutorial¶. This is a short tutorial for using xml.etree.ElementTree ( ET in short). The goal is to demonstrate some of the building blocks...
Read more >
Beautiful Soup 4.9.0 documentation - Crummy
This document covers Beautiful Soup version 4.11.0. ... object doesn't correspond to an actual HTML or XML tag, it has no name and...
Read more >
'Nonetype' object has no attribute 'findall' while using bs4
The error message is telling you that the variable named content does not contain a valid reference to an object. Which in turn...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found