Python - Standard Library Usage
Identify the error in this code snippet that tries to read an environment variable:
import os
api_key = os.getenv('API_KEY')
print(api_key.upper())
Assume API_KEY is not set in the environment.