undefinedimportMesh has failed JSON parse SyntaxError

Hey,

i don’t know in which Section i should post this Theme. I think this Section is good for it.

Now to my Problem:
I get at Loading my Model in the Browser a JSON parse Syntax Error. This Error don’t come from my Scripts. I think the Error is coming of my babylon Model.

Because no File has 125723 Lines :smiley:

This is the Error:
Unable to import meshes from drone.babylon: importMesh of undefined from undefined version: undefined, exporter version: undefinedimportMesh has failed JSON parse SyntaxError: JSON.parse: expected ‘,’ or ‘}’ after property value in object at line 125723 column 311 of the JSON data

I have looked also and found a Post where the Solution was the importing of babylonjs-loaders. But this don’t works for me.

I will attach the Model as blender and exported babylon File in a Zip File. The Size of the Zip is too big. So i have uploaded it to OneDrive: https://1drv.ms/u/s!Anyl5d59QIswxTNY7ArSQM2jOKTS?e=nFvt1Q

I hope you can help me. I’m ready to give a small Payment to get it fixed.

I have no problem loading your model on my local repository:

You should use this PG as a model:
https://playground.babylonjs.com/#NA1MSS

and upload your .babylon file on a server where it can be retrieved.

Have a look at this doc for instructions on how to do it: Using External Assets - Babylon.js Documentation

2 Likes

Hey,

thanks your your answer.

I have adding the Model now to the Playground. It works there… hm.
https://playground.babylonjs.com/#NA1MSS#2

I don’t understand why the Camera is so far away from the model.

Your model is very small because you have a 0.001 scaling on your root node (named “testimport bpy v3”).

1 Like

Thank you :slight_smile:

Now it works also at my other Script. :slight_smile:

I have another Question:
Why some Meshes are after converting to Babylon File at other Places. For example the Camera?

Edit:

I have adding a new Model in my Script. Now i get after converting to Babylon File in the Browserconsole the same Error like before:

Object { name: “untitled”, _isCompleted: false, _taskState: 3, meshesNames: “”, rootUrl: “”, sceneFilename: “untitled.babylon”, onSuccess: onSuccess(t), onError: onError(task, message, exception) , _errorObject: {…} }

Unable to import meshes from untitled.babylon: importMesh of undefined from undefined version: undefined, exporter version: undefinedimportMesh has failed JSON parse SyntaxError: JSON.parse: expected ‘,’ or ‘}’ after property value in object at line 125749 column 322 of the JSON data

Why?

I think we will need a repro in the PG to help further.

Hey,

i created now a new Playground. You will find the Error there also in the Console.

https://playground.babylonjs.com/#M73XVL

A new Stand:
I have tested it at every 3D Model. And at every Model there is coming this error.

I delete all Nodes at my 3D Model because they are the reason, why i can’t get the Models exported to a Babylon File. Maybe this is the Reason?

Is there an Error or Bug in the Babylon Converter at Blender?

Your file is not a valid json file, it seems there’s a problem in the Blender exporter.

@JCPalmer One parentId property is Schriftzug "Videosender" and it ends up as: "parentId": "Schriftzug "Videosender"" => the quotes are not escaped before being written to the file.

@Stef As a workaround, you can remove the quotes in your node / object names (I don’t know how it works in Blender).

The faulty names:

  • Schriftzug “Videosender”
  • Schriftzug “Empfänger für Fernbedienung”
1 Like

@Evgeni_Popov thanks for the diagnosis. I have bookmarked this for later. I am not doing anything about this for now. This is the first time in 5 years someone did this, and has a simple remedy of DDT, or don’t do that.

Have gotten too little of my own work done for 2 weeks in a row. Things are just going to slide here for a while.

1 Like

Hey,

thanks for your help. This was the Solution for this Error.

Many many Thanks.

How do you find this two things? I have looked also a lot of Time but didn’t find they.

I just tried to parse the .babylon file as a json string and the errors popped up.

1 Like

I understand.

Thanks for sharing it.