ml5-library Byte length error on CharRNN Interactive p5 Example - JavaScript

Dear ml5 community,

I'm submitting a new issue. Please see the details below.

→ Step 1: Describe the issue 📝

Did you find a bug? Want to suggest an idea for a new example?

On loading Interactive CharRNN p5 Example I receive the following error:

Uncaught RangeError: byte length of Float32Array should be a multiple of 4.

I'm running the example with a python server on localhost in chrome.

→ Step 2: Screenshots or Relevant Documentation 🖼

Here's some helpful screenshots and/or documentation of the new feature Screen Shot 2019-11-19 at 5 35 10 PM

→ Step 3: Share an example of the issue 🦄

Here's some example code or a demonstration of the issue in https://github.com/ml5js/ml5-examples OR in the https://editor.p5js.org or codepen/jsfiddle/etc...

The example wouldn't run in p5 online editor, so I downloaded and tried to run with a local server. I'm using the code as written in the example.

Other relevant information, if applicable

→ Describe your setup 🦄

Here's some helpful information about my setup...

  • Web browser & version: Version 78.0.3904.97 (Official Build) (64-bit)
  • Operating System: Mojave 10.14.6 (18G103)
  • ml5 version you're using: 0.4.3
  • Any additional notes

Thanks so much! You guys are 🌈🦄🦄🦄!

Asked Oct 13 '21 14:10
avatar lisajamhoury
lisajamhoury

1 Answer:

@lisajamhoury thanks so much for reporting these! It is SO helpful 🙏. (It is certainly time to write tests for all the examples 🙈)

This has to do with the CharRNN loading models in the p5 web editor. Making an issue in the ml5-library https://github.com/ml5js/ml5-library/issues/715

1
Answered Nov 20 '19 at 16:12
avatar  of joeyklee
joeyklee