script error doesn't make sense

Scripting in Blender with Python, and working on the API

Moderators: jesterKing, stiv

Post Reply
Posts: 0
Joined: Sat Jan 27, 2007 9:44 pm

script error doesn't make sense

Post by barryfx »

I just installed Blender 2.4.2a with Python 2.4 and blender2cs to convert models to Crystal Space 3d Worlds. I'm on Windows XP. When I run the exporter it is giving me the following error:

Traceback (most recent call last):
File "", line 3, in ?
File "C:\Program Files\Blender Foundation\Blender\.blender\scripts\bpymodules\
b2cs\", line 39, in ?
import defaults
File "C:\Program Files\Blender Foundation\Blender\.blender\scripts\bpymodules\
b2cs\", line 33, in ?
ui_keys["renderloops"] = b2cs.rloopparse.getRenderLoopList(b2cs.util.getSyst
AttributeError: 'module' object has no attribute 'rloopparse'

Here is part of the module it is complaining about:

# ugly defaults
import tempfile,b2cs,os,Blender
b2cs.prop.b2csdir = os.path.dirname(b2cs.__file__) # must set this first

import b2cs.metadata
import b2cs.rloopparse # isn't this the module in the error???????
import sys

ui_keys = b2cs.prop.global_keys
# get properties from worldsettings if possible:

ui_keys["paths"] = {}
ui_keys["sector_export"] = {}

ui_keys["dummyui"] = {}

regions = {}
ui_keys['crystalvar'] = str(b2cs.util.getSystemFolder("crystal"))
ui_keys['celvar'] = str(b2cs.util.getSystemFolder("cel"))
if not ui_keys['crystalvar']:
b2cs.prop.error = "E: The crystalspace shader directory could not be found. \nPlease check you have the CRYSTAL environment variable set, \nor else a working installation of crystalspace."

#parse renderloops
if b2cs.csxml.parser == b2cs.csxml.XML_PARSER_NONE:
b2cs.prop.error = "E: An XML parser could not be loaded. Please install pyxml (on windows) or 4suite."
ui_keys["renderloops"] = b2cs.rloopparse.getRenderLoopList(b2cs.util.getSystemFolder("shader"))

This last line is where it is failing, but it looks like the module has been imported (see comment). I don't know python (I know C++, java, perl) so I'm confused. Can somebody clear this up for me?


Posts: 0
Joined: Thu May 29, 2003 10:32 pm
Location: Maryland, U.S.

Post by ascotan »

The error says that the module b2cs has not method called rloopparse.

Since the script is importing b2cs at the top it should be working.

Maybe the file you have is out of date?

Post Reply