script error doesn't make sense

Scripting in Blender with Python, and working on the API

Moderators: jesterKing, stiv

Post Reply
barryfx
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 "csscene.py", line 3, in ?
File "C:\Program Files\Blender Foundation\Blender\.blender\scripts\bpymodules\
b2cs\__init__.py", line 39, in ?
import defaults
File "C:\Program Files\Blender Foundation\Blender\.blender\scripts\bpymodules\
b2cs\defaults.py", line 33, in ?
ui_keys["renderloops"] = b2cs.rloopparse.getRenderLoopList(b2cs.util.getSyst
emFolder("shader"))
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["output_dir"]=tempfile.gettempdir()
#ui_keys["temp_dir"]=tempfile.gettempdir()
#sync_world_settings()

ui_keys["celexport"]=b2cs.util.isMapForCel()
ui_keys["cache"]=False
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."
b2cs.status.post(b2cs.prop.error)

#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."
else:
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?

Thanks
Barry

ascotan
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 b2cs.py file you have is out of date?

Post Reply