Boredless Tourist Project and a ValueError I can't figure out

I can’t figure out why this code always returns a ValueError from my Try/Except block in the add_attraction() function. It seems that it should return what I’m looking for, but I’m sure there’s something obvious I’m missing. Thanks in advance!

1 Like

You’ve identified the type of error which is really important. It means you can troubleshoot yourself!

One way to do this is creating a pipeline of where your info is going. Formatted print statements work wonders and can not only help you print the value, but keep track of its type. This will help you structure and understand said structure better going down the line.

You’re right that there’s something obvious that you’re missing, and the ValueError gives you the hint you need to know where to look. Think about what a ValueError means. A simple look to compare your values should help you find the mistake.

I figured it out and it was as dumb as I thought it was going to be…I was entering “Los Angeles” and needed it to be “Los Angeles, USA”

We’ve all been there! At least you found it :slight_smile: