# Threejs AttributeError FBXLoader

**URL:** <https://forum.anaconda.com/t/threejs-attributeerror-fbxloader/29070>\
**Category:** PyScript\
**Created:** [July 24, 2022, 3:48pm UTC](https://forum.anaconda.com/t/threejs-attributeerror-fbxloader/29070 "2022-07-24T15:48:43Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![hebi](https://dub1.discourse-cdn.com/anaconda/user_avatar/forum.anaconda.com/hebi/32/1549_2.png) [@hebi](https://forum.anaconda.com/u/hebi)\
**Post date:** [July 24, 2022, 3:48pm UTC](https://forum.anaconda.com/t/threejs-attributeerror-fbxloader/29070/1 "2022-07-24T15:48:43Z")

</div>

I tried it use FBXLoader in threejs  
Got AttributeError. Any Suggestions?

Best Regards Gerhard

```auto
<html>
    <head>

        <meta name="viewport" content="width=device-width, initial-scale=1">
        <meta charset="UTF-8" />

        <link rel="stylesheet" href="https://pyscript.net/latest/pyscript.css" />
        <link href="./styles.css" rel="stylesheet" type="text/css">
        <script defer src="https://pyscript.net/latest/pyscript.js"></script>
        <script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/r128/three.js"></script>
        <script scr="./examples/js/loaders/FBXLoader.js"></script>
        <script src="./examples/js/controls/OrbitControls.js"></script>
    </head>
    <body>
        <h1>three.js with pyscript </h1>
        <div id="container">
        </div>
        <py-script>

from pyodide import create_proxy, to_js
from js import THREE, window, document, Array

loader = THREE.FBXLoader.new()

       </py-script>
    </body>
</html>

```

---

<div class="post-metadata">

**Author:** ![ktsh.tanaka.2020](https://dub1.discourse-cdn.com/anaconda/user_avatar/forum.anaconda.com/ktsh.tanaka.2020/32/1400_2.png) [@ktsh.tanaka.2020](https://forum.anaconda.com/u/ktsh.tanaka.2020)\
**Post date:** [July 24, 2022, 11:10pm UTC](https://forum.anaconda.com/t/threejs-attributeerror-fbxloader/29070/2 "2022-07-24T23:10:42Z")

</div>

Dear [hebi](https://forum.anaconda.com/u/hebi).

nice to meet you.  
Thank you very much for the valuable information.

The cause is that PyScript is also given priority because the runtime is written in js.

I think the current solution is to use different HTML instead of coexisting three.js and PyScript in the same HTML.

It may be possible to solve it in the future, but for now it is difficult.

see you.  
ktsh.tanaka.2020

---

<div class="post-metadata">

**Author:** ![hebi](https://dub1.discourse-cdn.com/anaconda/user_avatar/forum.anaconda.com/hebi/32/1549_2.png) [@hebi](https://forum.anaconda.com/u/hebi)\
**Post date:** [July 25, 2022, 7:16am UTC](https://forum.anaconda.com/t/threejs-attributeerror-fbxloader/29070/3 "2022-07-25T07:16:21Z")

</div>

Hello,

I am using threejs an pyscript in the same html and it works.  
I am using OrbitControl.js and that works.

But with FBXLoader there is an error. What is the difference?

Best regards Hebi

---

<div class="post-metadata">

**Author:** ![ktsh.tanaka.2020](https://dub1.discourse-cdn.com/anaconda/user_avatar/forum.anaconda.com/ktsh.tanaka.2020/32/1400_2.png) [@ktsh.tanaka.2020](https://forum.anaconda.com/u/ktsh.tanaka.2020)\
**Post date:** [July 25, 2022, 7:36am UTC](https://forum.anaconda.com/t/threejs-attributeerror-fbxloader/29070/4 "2022-07-25T07:36:04Z")

</div>

dear [hebi](https://forum.anaconda.com/u/hebi).

Sincerest apologies.  
Originally, I should have searched StackOverflow for three.js before answering.

In FBXLoader, AttributeError occurs because the required modules have not been imported.

The correct answer can be found at the following URL:

> <https://stackoverflow.com/questions/64924552/errors-including-and-calling-fbxloader-with-three-js>

see you.  
ktsh.tanaka.2020

---

<div class="post-metadata">

**Author:** ![Adam](https://avatars.discourse-cdn.com/v4/letter/a/00a5b5/32.png) [@Adam](https://forum.anaconda.com/u/Adam)\
**Post date:** [July 25, 2022, 11:38am UTC](https://forum.anaconda.com/t/threejs-attributeerror-fbxloader/29070/5 "2022-07-25T11:38:02Z")

</div>

Hello Hebi,  
I haven’t tried out the FBXLoader yet but when I used the TextureLoader I did this:

`foo = THREE.TextureLoader.new().load("path_for_image")`

I think that the TextureLoader from my pseudo code above is built into Three.js rather than an additional module like OrbitControls or FBXLoader so my suggestion is probably not going to be very helpful (sorry).  
I wonder if the FBXLoader has to wait for the model to finish loading as it is probably using javascript fetch to get the FBX model data?

Best wishes  
Adam
