ml5js / ml5-library

Friendly machine learning for the web! 🤖
https://ml5js.org
Other
6.45k stars 906 forks source link

Several times "TypeError: Cannot read property 'split' of undefined (: line 52)" in the exemples #1112

Open ifranc-r opened 3 years ago

ifranc-r commented 3 years ago

Hi, I was try to run some exemples from the website ml5 on the editor.p5js and some of them have always print the same error:

Uncaught TypeError: Cannot read property 'split' of undefined (: line 51)

I try to understand where it come from but I don't know where to start and I don't understand where it's.

here the list of the exemples who got this error: https://editor.p5js.org/ml5/sketches/pIs-vYk5O8 https://editor.p5js.org/ml5/sketches/DCGAN_Random https://editor.p5js.org/ml5/sketches/DCGAN_LatentVector_RandomWalk https://editor.p5js.org/ml5/sketches/DCGAN_LatentVector_Slider https://editor.p5js.org/ml5/sketches/StyleTransfer_Video https://editor.p5js.org/ml5/sketches/StyleTransfer_Image https://editor.p5js.org/ml5/sketches/PitchDetection https://editor.p5js.org/ml5/sketches/PitchDetection_Game https://editor.p5js.org/ml5/sketches/PitchDetection_Piano

Someone know where it come from it ?

swatiasinghal commented 3 years ago

Hi, facing the similar issue, did you find any resolution for the same? trying this in p5js editor function getTime() { var response = fetch ("http://worldtimeapi.org/api/timezone/asia/kolkata"); var responseData = await response.json(); var time = responseData.datetime; var hour = time.slice(11,13); console.log (hour); }