Running a script - error message

Hi. I apologize in advance for posting this here. I am not sure where to ask about why the script I am running shows an error. I am following the Jeep Wrangler tutorial from Cg Masters. Once the model of the Jeep is finished the instructor shows how to run a script that scales every mesh at the same time without messing with modifiers. He is running it in Blender 2.79 and I am using 2.9 which might be a problem.

I am not familiarized at all with python, my skills only goes as far as pressing “run script” . Unfortunately an errors comes when I try to do the same as him. I managed to copy paste the message in my blocnotes (attached)error.txt (42.4 KB)

In case this is cause of my Blender version maybe someone knows how to run it and avoid the error or might be new solutions to applying the scale of multiple meshes at the same time without affecting modifiers ?

Thank you for your time.

Yes, using 2.9 with the script may not work.

The error itself is not in the error.txt, it says

Python script failed, check the message in the system console

Start blender from the commandline, the error should be shown in the command window then.

Thanks for your reply. I apologize for my ignorance regarding code.

Should I follow these steps:
1- Run the script
2- Close Blender
3- Run blender from the comman dialog in windows
4- That will show the error, If so where?

Thank you

The right order is:

  • open a commandline

  • start blender from the commandline

  • run the script

  • the error shoud appear in the commandline window

If you work more with scripts take a look here:

Thank you !
The message that comes

Traceback (most recent call last):
File “C:\Users\Bruno\Documents\Tutorials\Jeep_Wrangler\untitled_85.blend\”, line 25, in
IndexError: list index out of range
Error: Python script failed, check the message in the system console

I dont have any clue on how to fix this

Without knowing the script, i guess this error comes up cause the selection for the script is invalid.
Check if you need to select a minimum, maximum and/or an active selection for the script.
Otherwise it can be just an incompatibility of the script with 2.9.

Luckily the instructor from the video will help me to fix the script. I appreciate your help a lot, but I am afraid I am not able to follow those instructions, my knowledge is really scarce when it comes to scripts.

Unfortunately the instructor could not make it work. I am not sure if this is possible, but would you be able to check what is wrong or tell me what to do in order to fix it? Thank you

File “[...]\”, line 25, in 
IndexError: list index out of range

This means that in the line 25 of the, there’s a call to some list with an index that is bigger than the size of the list.

You should post the script here for further inspection.

Thanks a lot! I uploaded the script now.

Just in case I explain a little bit the situation:

I am following a tutorial. The goal is to model a Jeep Wrangler. In the last part of the tutorial we need to apply a script that will apply all the scales to the different meshes and will set the general scale of the scene to 1, but without messing with the modifiers in the scene. At least that is what I understand.

Talking to the instructor from CG Masters he explained to me after working a little bit on it and how to make it compatible to 2.9 or 2.83 (the script was made for 2.79) that one of the problems was that I was also selecting the image references and the script will kind of not work on those…So I erased them, I also unlocked the locked meshes, which apparently also was a problem …But still I am getting an error.

So basically the tutor manipulates the unit scale in order to make the jeep 6 grid squares tall. After applying the script he will get the scene scale unit reset to 1 with the new scale. On top of that each mesh will reset to 1 without interfering in the modifiers active in each of the meshes. (4.5 KB)

I am not sure if the problem is 2.9 If making this work for 2.8 is easier then I am fine with it…I do not need to use 2.9 actually…

Thank you for your kind help. Even if you can not do it just the fact that people are helping me to understand the problem is admirable and I am thankful for that.

I can also send you the blender file I am working with if that helps to understand the incongruity between the file and the script.

Do you have your objects selected, when you run the script??
Because it gets the selected objects, and set the first one as active. Because the index called is 0, you’d only get an IndexError if there are no selected objects (and the objects collection is empty, so objects[0] fails).

I will send you a print screen. But yes I am selecting the objects.