Had the same headache. For me, it was a corrupted install. Fixed it by:
```
pip uninstall beautifulsoup4
pip cache remove beautifulsoup4
pip install beautifulsoup4 --no-cache-dir
```
Worked like a charm.
```
pip uninstall beautifulsoup4
pip cache remove beautifulsoup4
pip install beautifulsoup4 --no-cache-dir
```
Worked like a charm.
