Catch TypeError on pyephem when it can not find next pass.
In this case caught by sentry, the satellite was decayed and pyephem crashed with TypeError. We need to catch in network this issue and return related message to UI.
Sentry Issue: SATNOGS-NETWORK-866
TypeError: '<=' not supported between instances of 'NoneType' and 'NoneType'
(3 additional frame(s) were not displayed)
...
File "network/base/decorators.py", line 28, in wrap
return function(request, *args, **kwargs)
File "network/base/views.py", line 426, in prediction_windows
station_passes, station_windows = predict_available_observation_windows(
File "network/base/scheduling.py", line 254, in predict_available_observation_windows
pass_params = next_pass(observer, satellite)
File "network/base/scheduling.py", line 189, in next_pass
rise_time, rise_az, tca_time, tca_alt, set_time, set_az = observer.next_pass(
File "__init__.py", line 532, in next_pass
if result[0] <= result[2] <= result[4]:
AttributeError: 'str' object has no attribute 'path'
(13 additional frame(s) were not displayed)
...
File "django/template/base.py", line 199, in _render
return self.nodelist.render(context)
File "django/template/base.py", line 990, in render
bit = node.render_annotated(context)
File "django/template/base.py", line 957, in render_annotated
return self.render(context)
File "django/template/library.py", line 203, in render
output = self.func(*resolved_args, **resolved_kwargs)
File "network/base/templatetags/tags.py", line 14, in active
if request.path in (reverse(url) for url in urls.split()):
AttributeError: 'str' object has no attribute 'path'
(13 additional frame(s) were not displayed)
...
File "django/template/base.py", line 199, in _render
return self.nodelist.render(context)
File "django/template/base.py", line 990, in render
bit = node.render_annotated(context)
File "django/template/base.py", line 957, in render_annotated
return self.render(context)
File "django/template/library.py", line 203, in render
output = self.func(*resolved_args, **resolved_kwargs)
File "network/base/templatetags/tags.py", line 14, in active
if request.path in (reverse(url) for url in urls.split()):
AttributeError: 'str' object has no attribute 'path'
(13 additional frame(s) were not displayed)
...
File "django/template/base.py", line 199, in _render
return self.nodelist.render(context)
File "django/template/base.py", line 990, in render
bit = node.render_annotated(context)
File "django/template/base.py", line 957, in render_annotated
return self.render(context)
File "django/template/library.py", line 203, in render
output = self.func(*resolved_args, **resolved_kwargs)
File "network/base/templatetags/tags.py", line 14, in active
if request.path in (reverse(url) for url in urls.split()):
AttributeError: 'str' object has no attribute 'path'
(13 additional frame(s) were not displayed)
...
File "django/template/base.py", line 199, in _render
return self.nodelist.render(context)
File "django/template/base.py", line 990, in render
bit = node.render_annotated(context)
File "django/template/base.py", line 957, in render_annotated
return self.render(context)
File "django/template/library.py", line 203, in render
output = self.func(*resolved_args, **resolved_kwargs)
File "network/base/templatetags/tags.py", line 14, in active
if request.path in (reverse(url) for url in urls.split()):
AttributeError: 'str' object has no attribute 'path'
(13 additional frame(s) were not displayed)
...
File "django/template/base.py", line 199, in _render
return self.nodelist.render(context)
File "django/template/base.py", line 990, in render
bit = node.render_annotated(context)
File "django/template/base.py", line 957, in render_annotated
return self.render(context)
File "django/template/library.py", line 203, in render
output = self.func(*resolved_args, **resolved_kwargs)
File "network/base/templatetags/tags.py", line 14, in active
if request.path in (reverse(url) for url in urls.split()):