I suggest you report this on ledger support https://support.ledger.com/hc/en-us/requests/new
It seems that there is something wrong with java source code from the ledger that is why you are getting this error.
What is happening is that Mycelium is finding something "unexpected" when attempting to create the transaction via the Ledger, so it throws this "No scriptcode" error. The error is thrown here in the getScriptCode() method of the TransactionInput Class:
https://github.com/mycelium-com/wallet-android/blob/master/bitlib/src/main/java/com/mrd/bitlib/model/TransactionInput.java#L92
We can see from the code that it is checking if the "script" that it is trying to process is either "P2WSH" or "P2WPKH":
if (script instanceof ScriptInputP2WSH) {
throw new NotImplementedError();
} else if (script instanceof ScriptInputP2WPKH) {
...
#doStuff
...
} else {
throw new IllegalArgumentException("No scriptcode for " + script.getClass().getCanonicalName());
}
...
Again, I suggest that you contact the Mycelium devs using their GitHub issues register and log this error... it seems like the wallet is doing something that results in getting an "unexpected" script type (possibly trying to combine legacy and SegWit inputs? ). Definitely something the devs would be interested in looking into.