I'm running a django app on Firefox that uses Plotly for rendering graphs. In the beginning I was able to see the plotly graphs render, and now the plotly graphs aren't rendering. The Firefox console displays the following message when I load the view for rendering the graph
Loading failed for the
<script>with source https://cdn.plot.ly/plotly-latest.min.js.
How I'm loading the script in the HTML body
{% load static %}
<script src="https://cdn.plot.ly/plotly-latest.min.js"></script>
Calling the Plotly function
<script>
var metricsOneGraphDiv = document.getElementById('metricsOne');
var metricsOneTraces = [{
x: {{dates|safe}},
y: {{counts}},
type: 'scatter',
}]
var metricsOneLayout = {{layout | safe}}
Plotly.react(metricsOneGraphDiv, metricsOneTraces, metricsOneLayout);
</script>
In project settings I have 'django.contrib.staticfiles' under INSTALLED_APPS
INSTALLED_APPS = ['django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles']
How I'm defining the STATIC_URL and STATIC_ROOT in App Settings
STATIC_URL = '/static/'
STATIC_ROOT = os.path.join(BASE_DIR, 'static')
What could be causing the script to fail? Am I not able to render the plotly graph because of this warning? Again, I had plotly working fine before, I'm just getting this error now while running the scripts locally
I ensured that javascript is enabled on the Firefox browser. When I view the console on the Microsoft Edge browser the following error is shown
GET https://cdn.plot.ly/plotly-latest.min.js net::ERR_CERT_AUTHORITY_INVALID
I have the following installations