tobiasaurer commited on
Commit
73cb8e3
1 Parent(s): eeea86a

add errorhandling for nonexistent movie titles

Browse files
pages/2 - Movie-Based Recommender.py CHANGED
@@ -119,7 +119,10 @@ def find_movie_title(user_input):
119
  if match:
120
  result.append(match)
121
 
122
- return result[0][0]
 
 
 
123
 
124
 
125
  # USER INPUT:
 
119
  if match:
120
  result.append(match)
121
 
122
+ if result == []:
123
+ return st.write('Error: Your chosen movie is not included in our database. Please pick a different movie. ')
124
+ else:
125
+ return result[0][0]
126
 
127
 
128
  # USER INPUT: