Open akaihola opened 6 years ago
Maybe related to ipython-contrib/jupyter_contrib_nbextensions#527?
I'm failing on trying to run this extension on Azure notebooks too.
In my version of Chrome, error shows as failing to load resource from
Failed to load resource: the server responded with a status of 404 (Not Found)
https://gettingstarted-ousefulinfo.notebooks.azure.com/Scripts/jupyter/5.5.0/abcjs.js?v=20180815065512
which then leads to:
Refused to execute script from
'https://gettingstarted-ousefulinfo.notebooks.azure.com/Scripts/jupyter/5.5.0/abcjs.js?v=20180815065512'
because its MIME type ('') is not executable, and strict MIME type checking is enabled.
because of the 404.
There is a file at https://gettingstarted-ousefulinfo.notebooks.azure.com/nb/nbextensions/jupyter-abc/abcjs_basic_5.1.2-min.js but that's not being found. So where does the /Scripts/jupyter/5.5.0/abcjs.js
come from?
The %load_ext jupyter_abc
runs the following via its output cell:
require.config(
{paths: {abcjs: require.toUrl("nbextensions/jupyter-abc/abcjs_basic_5.1.2-min.js")},
shim: {abcjs: {exports: 'ABCJS'}}}
);
Would a workaround for now be to offer the opportunity to load the abc.js
file from a CDN?
@psychemedia, I guess Azure's version of Jupyter customizes URLs in a way that's different from just plain Jupyter.
A CDN would certainly be a work-around, but I'd like to solve this properly, hopefully with help from members of the Azure Notebooks team. It could also help them in making it easy for other extension authors to support Azure Notebooks.
We'll take a look at what we might be able to do here from a Azure notebooks POV and get back to this thread.
I just spotted in a PR to music21
that there's a method demonstrating using a local js file, though I haven't tried it on Azure notebooks: https://github.com/cuthbertLab/music21/pull/326
As a work around, disable "Experimental Notebooks" feature by editing your settings. We are working to fix a bug that will resolve this issue.
@rachelgshaffer This still doesn't work for me in Azure notebooks? Package installs and magics run without error but no score is displayed?
@psychemedia can you provide me a link to your library? Thanks!
@rachelgshaffer Example notebook here: https://notebooks.azure.com/OUsefulInfo/libraries/gettingstarted/html/4.1.0%20Music%20Notation.ipynb The abc demo is straight from the docs and appears about three quarters of the way into the notebook.
I'm trying to use
jupyter_abc
in https://jupyterabcdemo-kaiant.notebooks.azure.com/j/notebooks/jupyter_abc%20demo.ipynbOn Firefox, I see this in the Javascript console:
On Brave, the error is a bit more verbose:
Note that the host name is different (and wrong) on Brave.