summaryrefslogtreecommitdiff
path: root/pecan/routing.py
diff options
context:
space:
mode:
Diffstat (limited to 'pecan/routing.py')
-rw-r--r--pecan/routing.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/pecan/routing.py b/pecan/routing.py
index 1ac825f..1d534aa 100644
--- a/pecan/routing.py
+++ b/pecan/routing.py
@@ -152,7 +152,10 @@ def find_object(obj, remainder, notfound_handlers, request):
prev_remainder = remainder
prev_obj = obj
remainder = rest
- obj = getattr(obj, next_obj, None)
+ try:
+ obj = getattr(obj, next_obj, None)
+ except UnicodeEncodeError:
+ obj = None
# Last-ditch effort: if there's not a matching subcontroller, no
# `_default`, no `_lookup`, and no `_route`, look to see if there's