Please help a noob with batch STL import script

Hi guys,

I am still a noob at blender, and have almost zero programing skills.

I am trying to run this Python script for batch importing STL files, and having problems. I found the script here http://blender.formworks.co.nz/?p=2 and I am getting an error message “Python script error: check console”.

My console reports the following:
===== Friday, October 31, 2008 9:00:53 AM US/Pacific =====
1
Successfully imported 1.stl
Traceback (most recent call last):
File “/Users/heatherboylan/Desktop/Scripts/batch_stl.py”, line 304, in bevent
iterate_directory(g_working_dir.val)
File “/Users/heatherboylan/Desktop/Scripts/batch_stl.py”, line 405, in iterate_directory
read_file(working_dir+g_os_separator+file_name)
File “/Users/heatherboylan/Desktop/Scripts/batch_stl.py”, line 332, in read_file
n_x = unpack(“f”, file.read(4))
struct.error: unpack str size does not match format

Please any help would be greatly appreciated.

Thanks
Matt

Hmm,

STL import is one I use a bit, but I have never had this error, I wonder if lobo_nz would be able to help you? or is it pretty urgent?

How many files are you trying to import? if its only a few then manually loading the STL’s will work even though its a little bit of a pain.

The only error I had was the long file names error, (which was supposedly fixed).

Thanks Alltaken,

Unfortunately there are probably over 100 all said and done. But that is a good idea to get an email off to Lobo.

Thanks again

Just an update:

After an extremely quick response from Lobo.nz, and some code from Billy Araujo, my problems are solved.

Thanks again guys

Matt