Beautiful Soup Chocolate Project

I’m stuck at the beginning of this project. My code so far:

import codecademylib3_seaborn
from bs4 import BeautifulSoup
import requests
import pandas as pd
import matplotlib.pyplot as plt
import numpy as np

webpage = requests.get(‘’)
soup = BeautifulSoup(webpage.content, ‘html.parser’)

When I run it I get this error message:

Traceback (most recent call last):
File “”, line 10, in
UnicodeEncodeError: ‘ascii’ codec can’t encode character ‘\xa0’ in position 991: ordinal not in range(128)

1 Like

Hi @skaihat,

The soup object is of type <class 'bs4.BeautifulSoup'>. Though instruction 4 does invite you to print that object, it is not really ideal for such output. At position 991, a character was encountered that the print function could not process properly. You can safely skip that step and complete the project without that problematic print statement.


I understand, thank you very much.

1 Like