Error "Python script error: check console"

Scripting in Blender with Python, and working on the API

Moderators: jesterKing, stiv

Peixe
Posts: 2
Joined: Fri Jun 08, 2007 4:48 pm
Location: Germany / Brazil

Error "Python script error: check console"

Postby Peixe » Fri Jun 08, 2007 4:54 pm

Hello,


i am new and have for a few minutes downloaded
Blender 2.44 (installer) on a
Computer with Windows XP 32.

When I went to the menu "help" > websites > i.e. blender website > then
comes a message: Error "Python script error: check console".
What is wrong and what do I need???

Is it wrong to think that all what I need is in the Blender package???
What is Phython???

Greetings
Peixe
Love one another

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

Postby stiv » Fri Jun 08, 2007 5:46 pm

Python is Blender's scripting language.

The Blender 2.44 package for Windows is slightly broken and does not install what little Python we normally install for that platform.

Easist fix: go to www.python.org/download
and install Python 2.5.

Peixe
Posts: 2
Joined: Fri Jun 08, 2007 4:48 pm
Location: Germany / Brazil

Postby Peixe » Fri Jun 08, 2007 6:01 pm

Hi,

thank you, I have dowloaded it and will try it out.

Greetings
Peixe
Love one another

pmacd
Posts: 3
Joined: Sat Jul 07, 2007 6:10 am

Postby pmacd » Sat Jul 07, 2007 7:18 am

Peixe wrote:Hi,

thank you, I have dowloaded it and will try it out.

Greetings
Peixe


I had the same problem and solved it. I put up my solution in this forum post. I hope this helps...

http://www.blender.org/forum/viewtopic.php?t=11938

killakanz
Posts: 1
Joined: Wed Aug 01, 2007 5:21 pm

Postby killakanz » Wed Aug 01, 2007 5:27 pm

Hello.

Can someone who has the power put a note on the Blender download page that you need Python installed for most of Blender to work, and put a link in please?

It will save many newbies a good hour of trying to spot what's wrong and it'll save you guys a lot of these help threads :)

Cheers.

mranteater
Posts: 4
Joined: Thu Aug 23, 2007 11:55 pm

Unfold script related to check console

Postby mranteater » Fri Aug 24, 2007 12:05 am

I'm new to Python, but not Blender. I've been trying to use the new "unfolder" script included in 2.44, and I'm getting the same check console error. The console says:

Code: Select all

Compiled with Python version 2.3.5.
Checking for installed Python... got it!
One of the Python modules required can't be found.
No module named decimal
Traceback (most recent call last):
  File "<string>", line 21, in ?
ImportError: No module named decimal
Traceback (most recent call last):
  File "<string>", line 1229, in ?
NameError: name 'xml' is not defined


I'm guessing I need to somehow point blender at these python modules... possilby using the User Preferences... any ideas? Thank you!

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

Postby stiv » Fri Aug 24, 2007 7:25 am

Import errors are typically caused by missing Python modules. Bad paths are another reason we will ignore for the moment.

The problem here is the mesh_unfolder script requires the decimal module. The module was introduced in Python 2.4. You are running Python 2.3 which means the script will not work for you.

You have not mentioned which platform you are on. However, installing an updated version of Python from the convenient python.org packages is fairly simple. If you do update Python, you also need a version of Blender that uses that version of Python.

We try to maintain compatibility with Python 2.3 since one of our supported platforms, OSX, is still stuck on 2.3 even though the rest of the world has moved on. ( Current production Python is 2.5. ) In spite of our efforts, compatibility problems do sneak in. One more thing to fix for the Blender 2.45 release!

mranteater
Posts: 4
Joined: Thu Aug 23, 2007 11:55 pm

Postby mranteater » Fri Aug 24, 2007 7:36 am

thanks! dang, i meant to be thorough on my post... of course forgot to mention, yes, i'm on OS X (10.4.10). Also, I have downloaded Python 2.5 but am not sure how to get Blender to recognize it... It's obviously still linked to 2.3.

I think my answer may lie in this mess http://blenderartists.org/forum/showthread?t=7412

P.S. I was using Blender 2.37 until today and then got 2.44 and then python 2.5[/url]

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

Postby stiv » Fri Aug 24, 2007 8:02 am

Blender has an embedded Python interpreter that is built with a specific version of Python. You can tell which one by the "Compiled with Python version x.x" that Blender prints on startup.

This means that to use Python 2.5 you need a version of Blender built with Python 2.5.

You can try and cheat by setting environment variables like PYTHONHOME, but neither you nor Blender will be happy with the result.

mranteater
Posts: 4
Joined: Thu Aug 23, 2007 11:55 pm

Postby mranteater » Fri Aug 24, 2007 8:13 am

OK. thanks for the tips. much appreciated.

I'm new to environment variables so I'm trying to learn them now (not sure if these are within OS X or Blender right now), but in general on OS X it sounds like I'm out of luck for using python 2.5 (or 2.4 for that matter)... Since blender 2.44 on other platforms is using more recent versions of python I assume the same would be done for OS X if possible.

mranteater
Posts: 4
Joined: Thu Aug 23, 2007 11:55 pm

Postby mranteater » Fri Aug 24, 2007 8:19 am

... and this is the part where I feel like an idiot for "wasting" about 3 hours today. Just download the version marked

Custom Python 2.5 installations:
Blender 2.43, PowerPC, Python 2.5 (9MB): USA | Germany | Australia | NL


below the main version which comes with Python 2.3

Whadayaknow... the unfold script worked like a charm. Thanks for your help.

kontrare
Posts: 12
Joined: Wed Oct 10, 2007 2:45 am
Location: UK

Postby kontrare » Thu Oct 18, 2007 2:26 am

Hello all - ive got Python woes too (again :( )

Slackware 12 -> blender-2.44 -> Python-2.5

Trying to export a model in MD2 format and get:

Traceback (most recent call last):
File "<string>", line 50, in ?
File "/usr/lib/python/struct.py", line 30, in ?
from _struct import Struct, error
ImportError: No module named _struct

Any ideas please?
Have you guys ever thought of forking Python to BlenderPy - lol

Just a quickie too: can i use this account to go onto blenderartists forum?

TIA
kontrare
have you hugged your wolf today?

jesterKing
Site Admin
Posts: 1848
Joined: Fri Oct 18, 2002 12:48 pm
Location: Finland

Postby jesterKing » Thu Oct 18, 2007 7:13 am

kontrare wrote:Just a quickie too: can i use this account to go onto blenderartists forum?


No, they are seperate.

/Nathan

jesterKing
Site Admin
Posts: 1848
Joined: Fri Oct 18, 2002 12:48 pm
Location: Finland

Postby jesterKing » Thu Oct 18, 2007 7:15 am

kontrare wrote:Traceback (most recent call last):
File "<string>", line 50, in ?
File "/usr/lib/python/struct.py", line 30, in ?
from _struct import Struct, error
ImportError: No module named _struct


Without further investigation, the error message and stack trace leads me to believe your python install is borked. At least struct.py looks like it is from your Python install...

/Nathan

kontrare
Posts: 12
Joined: Wed Oct 10, 2007 2:45 am
Location: UK

Postby kontrare » Thu Oct 18, 2007 12:29 pm

jesterKing wrote:
kontrare wrote:Traceback (most recent call last):
File "<string>", line 50, in ?
File "/usr/lib/python/struct.py", line 30, in ?
from _struct import Struct, error
ImportError: No module named _struct


Without further investigation, the error message and stack trace leads me to believe your python install is borked. At least struct.py looks like it is from your Python install...

/Nathan


Hey JesterKing me an a mate were chattin to you back in the year on the Blender irc about building Blender ;) - thanks for these replies.

Would it do any good if i install a fresh python under my dotBlend say and set the PYTHONHOME & PYTHONPATH to this?
I noticed up the thread after i posted that stiv had said this tho:
You can try and cheat by setting environment variables like PYTHONHOME, but neither you nor Blender will be happy with the result.


Normally i wouldnt be too bothered but i really could do with getting the export stuff working as im trying to help someone out with a few meshes for a game remake. Also i'de like to get the MD2 thing going for me as im playing with some OpenGL code and thats the format its using.

cheers again - kontrare
have you hugged your wolf today?


Return to “Python”

Who is online

Users browsing this forum: No registered users and 0 guests