How to Solve NameError: name 'NavigableString' is not defined -- bs4

Solution: Import the 'NavigableString' module

# Add the following line to the top of your code
from bs4 import NavigableString

 

For more information:
bs4 NavigableString