Sprawdź typ wyjątku

try:
	# the code for which you want to catch the exception 
except Exception as err:
	print(err)
ykk