You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
File "/Users/allixsenos/webs/hitlist/backend/venv/lib/python2.7/site-packages/django/core/handlers/base.py", line 114, in get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/Users/allixsenos/webs/hitlist/backend/api/views.py", line 1627, in deals_list
return deals_list_v3(request, api_version, *args, **kwargs)
File "/Users/allixsenos/webs/hitlist/backend/api/timing.py", line 50, in _wrapper
return f(*args, **kwargs)
File "/Users/allixsenos/webs/hitlist/backend/venv/lib/python2.7/site-packages/django/views/generic/base.py", line 69, in view
return self.dispatch(request, *args, **kwargs)
File "/Users/allixsenos/webs/hitlist/backend/venv/lib/python2.7/site-packages/django/views/decorators/csrf.py", line 57, in wrapped_view
return view_func(*args, **kwargs)
File "/Users/allixsenos/webs/hitlist/backend/venv/lib/python2.7/site-packages/rest_framework/views.py", line 400, in dispatch
response = self.handle_exception(exc)
File "/Users/allixsenos/webs/hitlist/backend/venv/lib/python2.7/site-packages/rest_framework/views.py", line 397, in dispatch
response = handler(request, *args, **kwargs)
File "/Users/allixsenos/webs/hitlist/backend/venv/lib/python2.7/site-packages/rest_framework/decorators.py", line 49, in handler
return func(*args, **kwargs)
File "/Users/allixsenos/webs/hitlist/backend/api/utils.py", line 293, in inner
return func(request, *args, **kwargs)
File "/Users/allixsenos/webs/hitlist/backend/api/views.py", line 1685, in deals_list_v3
return deals_for_city_v3(request, api_version, city, flights)
File "/Users/allixsenos/webs/hitlist/backend/api/views.py", line 1638, in deals_for_city_v3
flights = filter_flights(request, flights)
File "/Users/allixsenos/webs/hitlist/backend/api/utils.py", line 147, in filter_flights
date_start = arrow.get(request.GET.get('date_start')) if request.GET.get('date_start') else None
File "/Users/allixsenos/webs/hitlist/backend/venv/lib/python2.7/site-packages/arrow/api.py", line 23, in get
return _factory.get(*args, **kwargs)
File "/Users/allixsenos/webs/hitlist/backend/venv/lib/python2.7/site-packages/arrow/factory.py", line 156, in get
dt = parser.DateTimeParser(locale).parse_iso(arg)
File "/Users/allixsenos/webs/hitlist/backend/venv/lib/python2.7/site-packages/arrow/parser.py", line 104, in parse_iso
return self._parse_multiformat(string, formats)
File "/Users/allixsenos/webs/hitlist/backend/venv/lib/python2.7/site-packages/arrow/parser.py", line 245, in _parse_multiformat
raise ParserError('Could not match input to any of {0} on \'{1}\''.format(formats, string))
UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-3: ordinal not in range(128)
if the string passed to arrow.get() is a unicode string and parsing fails, it will not raise a ParserError but a UnicodeEncodeError
suggest either making the parsing message unicode, or not including the original string in the message
offending string is u'٢٠١٤-١٢-٠١' or u'\u0662\u0660\u0661\u0664-\u0661\u0662-\u0660\u0661'
The text was updated successfully, but these errors were encountered:
This seems to only be an issue with Python 2.7. I tried implementing the fix recommended in this StackOverflow post: https://stackoverflow.com/a/29430342/3820660, but our testing framework, Chai, does not seem to play well with the change.
if the string passed to arrow.get() is a unicode string and parsing fails, it will not raise a ParserError but a UnicodeEncodeError
suggest either making the parsing message unicode, or not including the original string in the message
offending string is
u'٢٠١٤-١٢-٠١'
oru'\u0662\u0660\u0661\u0664-\u0661\u0662-\u0660\u0661'
The text was updated successfully, but these errors were encountered: