summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorLeonard Richardson <leonardr@segfault.org>2020-05-31 17:39:43 -0400
committerLeonard Richardson <leonardr@segfault.org>2020-05-31 17:39:43 -0400
commit239f8721716015ab194ba853aebc0580f718e7ba (patch)
tree56c92b275cdc7044644ae85515e199ba9f39fb11 /doc
parentcd2a59fbd92fd78cde913b19bc14c2fda6122750 (diff)
Added to the troubleshooting section a bit to catch searches for the AttributeError that happens if you treat a string like a tag.
Diffstat (limited to 'doc')
-rw-r--r--doc/source/index.rst9
1 files changed, 8 insertions, 1 deletions
diff --git a/doc/source/index.rst b/doc/source/index.rst
index 91bd42b..b3201ed 100644
--- a/doc/source/index.rst
+++ b/doc/source/index.rst
@@ -3147,7 +3147,7 @@ The most common type of unexpected behavior is that you can't find a
tag that you know is in the document. You saw it going in, but
``find_all()`` returns ``[]`` or ``find()`` returns ``None``. This is
another common problem with Python's built-in HTML parser, which
-sometimes skips tags it doesn't understand. Again, the solution is to
+sometimes skips tags it doesn't understand. Again, the best solution is to
:ref:`install lxml or html5lib. <parser-installation>`
Version mismatch problems
@@ -3242,6 +3242,13 @@ Miscellaneous
returning a tag or a string. You need to figure out why your
``find()`` call isn't returning anything.
+* ``AttributeError: 'NavigableString' object has no attribute
+ 'foo'`` - This usually happens because you're treating a string as
+ though it were a tag. You may be iterating over a list, thinking
+ that it contains only tags, when it actually contains both tags and
+ strings.
+
+
Improving Performance
---------------------