## Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

### Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

# It gives complicated explanation for ValueError

I am currently doing my master ticket project. I got it to raise a ValueError if the amount of tickets requested is g greater than the amount tickets remaining. The error response for that is also suitable. However, when passing along a string, it gives the actual error instead of the simple, user-friendly output that I like. Can someone help? My code is as follows

```TICKET_PRICE = 10
tickets_remaining = 100
while tickets_remaining >=1:
print("They're are {} tickets remaining".format(tickets_remaining))
user_name =input("Hello, welcome to Ticket Master! What is your name? ")
number_of_tickets= input( "Well...{}, how many tickets would you like to buy?".format(user_name))
try:
number_of_tickets = int(number_of_tickets)
if number_of_tickets > tickets_remaining:
raise ValueError("Sorry, we only have {} tickets left".format(tickets_remaining))
if number_of_tickets == str:
raise ValueError ("Incorrect value. Please write a number")
except ValueError as err:
print("We ran into an issue. {}. Please try again.".format(err))
else:
total= (number_of_tickets * TICKET_PRICE)
print(" {}, your total is {}".format(user_name,total))
proceed= input(" Would you like to proceed with purchase, Y for yes, N, for no:  ")
if proceed.lower() == "y":
#TODO: Gather Credit Card Information and process it.
tickets_remaining = (tickets_remaining - number_of_tickets)
else:
print("{}, thank you for your consideration. Come again!".format(user_name))

print("Sorry, they're are no more tickets")
```

```    print("We ran into an issue. {}. Please try again.".format(err))  # so instead of this