From 118de44666d8084f8f059b3b4a38620de59af3c8 Mon Sep 17 00:00:00 2001 From: Mark Gibbs Date: Sat, 18 Jan 2020 23:55:23 -0800 Subject: [PATCH] Handle case of missing module file information --- django_plotly_dash/dash_wrapper.py | 5 ++++- django_plotly_dash/version.py | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/django_plotly_dash/dash_wrapper.py b/django_plotly_dash/dash_wrapper.py index ed474cf6..73d6c6b1 100644 --- a/django_plotly_dash/dash_wrapper.py +++ b/django_plotly_dash/dash_wrapper.py @@ -156,7 +156,10 @@ def __init__(self, name=None, serve_locally=None, # Remember some caller info for static files caller_frame = inspect.stack()[1] self.caller_module = inspect.getmodule(caller_frame[0]) - self.caller_module_location = inspect.getfile(self.caller_module) + try: + self.caller_module_location = inspect.getfile(self.caller_module) + except: + self.caller_module_location = None self.assets_folder = "assets" def get_asset_static_url(self, asset_path): diff --git a/django_plotly_dash/version.py b/django_plotly_dash/version.py index 7d265491..f2915eb7 100644 --- a/django_plotly_dash/version.py +++ b/django_plotly_dash/version.py @@ -23,4 +23,4 @@ ''' -__version__ = "1.1.4" +__version__ = "1.1.5"