planning for the eventual failure of

Does anyone have a handy function to identify and mitigate potential failures w/

I am using to help me convert Nepali ‘Preeti’ font to unicode, as follows:

preeti = require('') has been failing the past few days, though works:

preeti_alt = require('')

While it’s simple enough for me just to edit in and out the _alt extension when calling the function, it’d be ideal if I didn’t have to–if, upon failure of one require, the next one is automatically attempted.

Any guidance? :pray:

Here’s my conversion notebook:

I recommend saving the output of or as a file, and then attaching it to your notebook. You can then load it like so (replacing the file name as appropriate):

preeti = require(await FileAttachment("preeti.js").url())

Thanks @mike! :man_dancing: This certainly does the trick :slight_smile: I’ve re-shared the notebook with your recommended approach for anyone later clicking through these topics.

1 Like

Sometimes will cache a failed build. You can work around it and force a new build by slightly changing the URL, e.g. require('') (it doesn’t matter what you append).