# LoadModel() not working?

**URL:** <https://discourse.processing.org/t/loadmodel-not-working/24229>\
**Category:** p5.js\
**Created:** [September 29, 2020, 9:58pm UTC](https://discourse.processing.org/t/loadmodel-not-working/24229 "2020-09-29T21:58:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![pheelia](https://avatars.discourse-cdn.com/v4/letter/p/258eb7/32.png) [@pheelia](https://discourse.processing.org/u/pheelia)\
**Post date:** [September 29, 2020, 9:58pm UTC](https://discourse.processing.org/t/loadmodel-not-working/24229/1 "2020-09-29T21:58:20Z")

</div>

`//draw a spinning teapot  
let teapot;

function preload() {  
// Load model with normalise parameter set to true  
teapot = loadModel(‘assets/teapot.obj’, true);  
}

function setup() {  
createCanvas(100, 100, WEBGL);  
}

function draw() {  
background(200);  
scale(0.4); // Scaled to make model fit into canvas  
rotateX(frameCount \* 0.01);  
rotateY(frameCount \* 0.01);  
normalMaterial(); // For effect  
model(teapot);  
}`

Hey,  
I’m trying out the example given in the reference for the LoadModel() method.  
Unfortunately it doesn’t work.  
When using it in the browser it just says “Loading…”  
When using a local web server I see nothing.  
The teapot.obj is in the directory containing the index.html and sketch.js, as well as in a folder called “assets”.

These are some errors in the browser:

p5.js says: loadStrings() was expecting Function for the third parameter, received an empty variable instead. (on line 48748 in p5.js [file:///C:/Users/nikla/Desktop/p5js/p5.js:48748:67])

p5.js says: It looks like there was a problem loading your text file. Try checking if the file path (TypeError: NetworkError when attempting to fetch resource.) is correct, hosting the file online, or running a local server. (More info at [https://github.com/processing/p5.js/wiki/Local-server](https://github.com/processing/p5.js/wiki/Local-server))

p5.js says: An error with message “NetworkError when attempting to fetch resource.” occured inside the p5js library when “\_wrapPreload/\<” was called (on line 6 in sketch.js [file:///C:/Users/nikla/Desktop/p5js/new/sketch.js:6:12]).

If not stated otherwise, it might be due to “\_wrapPreload/\<” being called from preload. Nothing besides load calls (loadImage, loadJSON, loadFont, loadStrings, etc.) should be inside the preload function. ([http://p5js.org/reference/#/p5/preload](http://p5js.org/reference/#/p5/preload))

Uncaught (in promise) TypeError: NetworkError when attempting to fetch resource.
