Script Question

Hey I’m having problems with a script
what does it mean when i get this error

Traceback (most recent call last):
  File "ExportDTS.py", line 498, in ?
  File "ExportDTS.py", line 422, in process_objects
AttributeError: getLocation

thanks
chuck

getLocation is a method call in the blender210 api, so that script will probably just work in Blender 2.23, and probably not without some modifications.

Martin

Well, actually it is the other way around, it is only available in the new API (any version after 2.23). What Blender version are you using?

But on the other hand, knowing your work, it might have to do with the game-engine and you really mean getPosition()?

I have Blender versions 2.23-2.26 available. its a script that exports to an external file format dts.
I get different errors in each of the versions of blender

2.23

DTS Exporter running...
Writing file: "Car.dts"
PYTHON SCRIPT ERROR:
Traceback (most recent call last):
  File "ExportDTS.py", line 486, in ?
AttributeError: get

2.24

DTS Exporter running...
Writing file: "Car.dts"
Objects:
-->  Circle
location =
Traceback (most recent call last):
  File "ExportDTS.py", line 498, in ?
  File "ExportDTS.py", line 422, in process_objects
AttributeError: getLocation

2.25,2.26

vIx =  433 vIy =  432 vIz =  449
vIx =  433 vIy =  448 vIz =  447
vIx =  434 vIy =  447 vIz =  446
vIx =  435 vIy =  446 vIz =  445
vIx =  436 vIy =  445 vIz =  444
vIx =  437 vIy =  444 vIz =  443
vIx =  438 vIy =  443 vIz =  442
vIx =  439 vIy =  442 vIz =  441
vIx =  431 vIy =  440 vIz =  441
vIx =  450 vIy =  441 vIz =  451
vIx =  442 vIy =  451 vIz =  441
vIx =  443 vIy =  451 vIz =  442
vIx =  444 vIy =  451 vIz =  443
vIx =  445 vIy =  451 vIz =  444
vIx =  446 vIy =  451 vIz =  445
vIx =  447 vIy =  451 vIz =  446
vIx =  448 vIy =  451 vIz =  447
vIx =  448 vIy =  449 vIz =  451
vIx =  450 vIy =  451 vIz =  449
vIx =  105 vIy =  104 vIz =
Traceback (most recent call last):
  File "ExportDTS.py", line 498, in ?
  File "ExportDTS.py", line 451, in process_objects
IndexError: list index out of range

any sugestions?
Thanks
Chuck

Well, at least it seems to function in 225/226. So it might probably just be a bug in the script I guess.

edit: It might expect the model in a certain format? Maybe it can only export triangles or maybe you have some stray vertices somewhere, it looks like it maybe can’t find the third vertex of a face?

doh, sorry, my bad.

Martin

I had a few stray edges in my model somewhere that was causing the error, and it only works in 2.25,2.26
so thanks
I have one more question though. it doesn’t save the file, it runs, then the last line in the consol says its done, but when i try to find the file its no where to be seen…What would i look for in the code that would give me an idea why its not saving the file?

Thanks
Chuck

Well, there probably is something like:


file = open(name..)

I am not familiar with this script, any place I could download it to take a look?