Python - 3DS Import Problem

Scripting in Blender with Python, and working on the API

Moderators: jesterKing, stiv

carlitowebb
Posts: 3
Joined: Mon Jan 30, 2006 1:46 pm
Location: London
Contact:

Python - 3DS Import Problem

Postby carlitowebb » Mon Jan 30, 2006 1:52 pm

Hi, can anyone help - I'm brand new to Blender and am trying to import a 3DS object (exported from Sketchup 5). I've tried a model and even a simple box - each time I get the error "Python Script Error - Check Console". !!

I'm stuck at this point, I thought it was because the files were on my desktop - and the path lenght was too long, so moved the file to a folder on the local HDD and still same problem.

The box was just a simple 100mm x 100mm x 100mm cube exported straight out of Sketchup.

Suggestions?

Carl

stiv
Posts: 3646
Joined: Tue Aug 05, 2003 7:58 am
Location: 45N 86W

Postby stiv » Mon Jan 30, 2006 3:59 pm

Python Script Error - Check Console


Whatever you do, DO NOT look at the console and read the message there. The information revealed can be too horrible for the mere human mind to accept.

Also, do not report the console message here in the hope that we can solve the problem.

lusque
Posts: 77
Joined: Wed Oct 16, 2002 9:53 am

Postby lusque » Tue Jan 31, 2006 9:42 am

The same thing happened to me today, I tried to open a 3ds file with Blender 2.41 under WinXP, getting the error "Python Script Error- Check Console"

That's the output:

Code: Select all

Importing "e:\MABE\PVC\pulpito\pulpito sat xl.3DS"
Traceback (most recent call last):
  File "<string>", line 646, in my_callback
  File "<string>", line 634, in load_3ds
  File "<string>", line 603, in process_main_chunk
  File "<string>", line 260, in process_object_block
  File "<string>", line 199, in getUniqueName
ValueError: object "K27623:1" not found


Also note that I can import the same 3ds in Blender 2.40 without errors.
So I think something's wrong with the 3ds importer.
Do I have to tell this to someone in particular? If so, who is and how can I contact him? Thankyou.

Sorry for my bad english and sorry, I can't post the 3ds file, is a work thing.

carlitowebb
Posts: 3
Joined: Mon Jan 30, 2006 1:46 pm
Location: London
Contact:

Direction?

Postby carlitowebb » Tue Jan 31, 2006 9:44 am

Ok, can someone point me in the direction of the correct forum? Being totally new to Blender - all I want to do is resolve this minor issue and get a move on doing a small dental project.

carlito.

lusque
Posts: 77
Joined: Wed Oct 16, 2002 9:53 am

Postby lusque » Tue Jan 31, 2006 11:18 am

Carlitowebb you are in the correct forum. Stiv was just telling you (with humor ;)) that without more information is impossible to help you.

Read my post above, if you get the same error you can try importing the 3ds in Blender 2.40, it worked for me.

stiv
Posts: 3646
Joined: Tue Aug 05, 2003 7:58 am
Location: 45N 86W

Postby stiv » Tue Jan 31, 2006 3:53 pm

lusque wrote:

Code: Select all

  File "<string>", line 199, in getUniqueName
ValueError: object "K27623:1" not found


Object.Get() now throws ValueError instead of the rather incorrect AttributeError when it can not find an object by name.

In the getUniqueName function (around line 203)
except AttributeError:
needs to be
except ValueError:

lusque
Posts: 77
Joined: Wed Oct 16, 2002 9:53 am

Postby lusque » Tue Jan 31, 2006 6:39 pm

Thank you stiv, it worked. :D

carlitowebb
Posts: 3
Joined: Mon Jan 30, 2006 1:46 pm
Location: London
Contact:

Many thanks

Postby carlitowebb » Wed Feb 01, 2006 9:51 am

That works - and apologies for my apparent lack of humour. Bad day!! Many thanks. Superb.

stiv
Posts: 3646
Joined: Tue Aug 05, 2003 7:58 am
Location: 45N 86W

Postby stiv » Wed Feb 01, 2006 4:55 pm

It is not humor. It is an experiment in using reverse psychology to get people to actually check the console and read the error messages printed there. What could be more attractive than that which is forbidden!

It happens more on elysiun since those are the user forums, but you would be apalled at how many times this pattern is repeated:

A: I'm getting an error! What should I do?
B: What is the error message?
A: I don't know. I did not read it.

Not being able to find the console is a completely separate topic.

Note: the afflicted scripts have been fixed in CVS.

panzer
Posts: 4
Joined: Wed Feb 01, 2006 8:13 pm

Postby panzer » Wed Feb 01, 2006 8:18 pm

Hi.... I'm also a complete Blender newb, and I'm getting that exact error.

What I'm lost on, is what exactly is the fix? Am I looking for the getUniqueName in code somewhere, so I can change 'except AttributeError:' to 'except ValueError:'?

Sorry for the stupid question, I'm about a day into Blender, and pushing hard through the documentation and tutorials!

lusque
Posts: 77
Joined: Wed Oct 16, 2002 9:53 am

Postby lusque » Wed Feb 01, 2006 9:31 pm

@stiv: even if it was a psychology experiment it was funny :D

@panzer: Don't worry, you have 2 choices:

1: download and install Blender 2.40 in another folder (not the one you have installed Blender 2.41). Use Blender 2.40 to import the 3ds file, save a blend and continue working in Blender 2.41

2: locate the file "3ds_import.py", if you are under windows it is in a subfolder of the blender installation directory.
Mine is: "C:\Program Files\Blender Foundation\Blender241\.blender\scripts"
Open "3ds_import.py" in a text editor (Notepad is fine)
Go to the row 203 and substitute
"except AttributeError:"
with
"except ValueError:"
save and exit. Now it should work

panzer
Posts: 4
Joined: Wed Feb 01, 2006 8:13 pm

Postby panzer » Wed Feb 01, 2006 10:35 pm

Awesome, thanks lusque. That's exactly what I needed to know. Worked perfectly! (I did #2)

dharveymi
Posts: 2
Joined: Wed Mar 29, 2006 1:17 am
Location: Florida

Same thing on the Mac

Postby dharveymi » Wed Mar 29, 2006 3:03 am

I can not find the scripts file on the my mac. Also don't know how to access the console. Please help.

reed
Posts: 25
Joined: Thu Jun 17, 2004 4:07 pm

Postby reed » Thu Mar 30, 2006 11:30 pm

I don't know where the scripts directory is on MacOSX but the Console is an application (look in Utilities).

lusque
Posts: 77
Joined: Wed Oct 16, 2002 9:53 am

Postby lusque » Sat Apr 01, 2006 11:56 am

Hi dharveymi,
unluckly I'm not a Mac owner so I don't know where exactly the file is, but have you tried "find" on your entire harddisk?
Or maybe is in a hidden folder of the blender folder (I know that on Unix systems filenames that begin with a dot (like ".blender") are usually hidden).
Sorry I cannot help you more than this.

Also there's a misunderstanding.
The Blender "consolle" is the other window that opens when you launch Blender. It is black an smaller than the blender window and shows only text messages. Usually is placed behind the blender window, so maybe you didn't notice. It is used by blender to tell you things like errors, warnings, ecc...
Again, this is the behaviour on windows, I'm not sure for Macs.

But fear not! This forum is full of Mac Blenderheads willing to help :D
By the way you can also try on www.elysiun.com forum


Return to “Python”

Who is online

Users browsing this forum: No registered users and 2 guests