ml5-library icon indicating copy to clipboard operation
ml5-library copied to clipboard

ML5.js example not working

Open quintendewilde opened this issue 4 years ago • 1 comments

Hi,

I'm trying to test an example from the example page. But I'm unable to get this working.

Screen Shot 2020-12-16 at 10 21 03 AM

quintendewilde avatar Dec 16 '20 09:12 quintendewilde

The error that you are seeing in those logs is a downstream error. The callback function(err, result) { will get either an error or a result. Here it does not have a result, so the result.src on the next line produces the error "Cannot read property 'src' of undefined".

We need to know what the actual error was which occurred during the execution of transfer. Try using this callback instead and see what you get in the log.

  style1.transfer(inputImg, function(err, result) {
    if (err) {
       console.log(err);
    } else {
       createImg(result.src).parent('styleA');
    }
  });

lindapaiste avatar Jun 12 '22 19:06 lindapaiste

Closing stale issue

sproutleaf avatar Jul 11 '23 01:07 sproutleaf