Crystal Space
Welcome, Guest. Please login or register.
November 19, 2017, 01:31:23 pm

Login with username, password and session length
Search:     Advanced search
9081 Posts in 2051 Topics by 80448 Members
Latest Member: Ludivinawhite5876
* Home Help Search Login Register
+  Crystal Space
|-+  Crystal Space Development
| |-+  Support
| | |-+  crystal2blender install issue
« previous next »
Pages: [1] Print
Author Topic: crystal2blender install issue  (Read 3333 times)
Posts: 5

View Profile Email
« on: August 31, 2009, 04:33:03 pm »

    I'm having trouble with my blender2crystal exporter.  I am using ubuntu jaunty with blender 2.49.  I have cel-1.9 and celstart-1.9 installed from packages.  I'm just trying to get the exporter to work for the first time.  I used .deb packages from the repositories at;

deb intrepid main

to install;


which allowed me to install a .deb package I found for blender2crystal from Angel Abad's repository for ubuntu jaunty.

When I installed the first packages, all dependencies were finally satisfied and I was able to install the blender2crystal .deb package.  I also used the site;

with the command;

sudo cp -vR /usr/lib/blender/* /usr/share/blender/

to copy files from the package default file folder to /usr/share/blender/ which worked and helped me avoid the no package with b2cs console error.  I also use the command;

export CRYSTAL="/usr/share/crystalspace"

to export the variable so that blender2crystal can find the install directory.  I checked the directory and it has files in it.  However when I tried to use the exporter after doing all this, I still get an error at the console.  The error message is;

weaponx69@weaponx69-desktop:/usr/share/crystalspace-1.4$ blender
Compiled with Python version 2.6.2.
Checking for installed Python... got it!
/home/weaponx69/.blender/scripts/bpymodules/b2cs/util/ DeprecationWarning: The popen2 module is deprecated.  Use the subprocess module.
  import popen2
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/weaponx69/.blender/scripts/blender/", line 46, in <module>
    import b2cs
  File "/home/weaponx69/.blender/scripts/bpymodules/b2cs/", line 49, in <module>
    import defaults
  File "/home/weaponx69/.blender/scripts/bpymodules/b2cs/", line 5, in <module>
    import b2cs.metadata
  File "/home/weaponx69/.blender/scripts/bpymodules/b2cs/", line 475, in <module>
    b2cs.prop.wid_keys = UiProperties()
  File "/home/weaponx69/.blender/scripts/bpymodules/b2cs/", line 444, in __init__
  File "/home/weaponx69/.blender/scripts/bpymodules/b2cs/", line 447, in Refresh
  File "/home/weaponx69/.blender/scripts/bpymodules/b2cs/", line 450, in loadFromMetadata
    for wid in world_metadata.getNodes():
  File "/home/weaponx69/.blender/scripts/bpymodules/b2cs/", line 234, in getNodes
    sect = self.getSection()
  File "/home/weaponx69/.blender/scripts/bpymodules/b2cs/", line 228, in getSection
    root = self.getRoot()
  File "/home/weaponx69/.blender/scripts/bpymodules/b2cs/", line 206, in getRoot
    propval = xpath(self.internalroot,"//prop[@name='metadata_file']/@value")
  File "/home/weaponx69/.blender/scripts/bpymodules/b2cs/", line 47, in xml_xpath
    nodes = node.xpath(xpath)
AttributeError: Element instance has no attribute 'xpath'

I checked the forums and it seems like there is another user that uses windows XP that has this same error so it doesn't seem to be just a linux related issue.  I'm guessing that I have to make some other changes to make it work somehow.  Does anyone know what the problem is?  It doesn't seem platform specific since a windows user is having the same problem.
Posts: 1

View Profile
« Reply #1 on: October 15, 2009, 08:28:50 pm »

Hi, I'm on WinXP, well I have/had this problem as well, but I found this site:

I've added that part to the system variables, this helped "solve" that xpath error (there's more in the instructions but I didn't do the rest cause that file was hcanged in later versions):

but it still didnt work cause soon in the console another error appeared:
rest of the adress...\b2cs\", line 55, in xml_parseString

newdoc = Domlette.NonvalidatingReader.parseString(mem.documentElement

NameError: global name 'Domlette' is no defined

Now I went to check what that line 55 was and it's this:
# loads a xml dom from a string
def xml_parseString(mem):
        newdoc = xml.dom.minidom.parseString(mem).documentElement
        newdoc = Domlette.NonvalidatingReader.parseString(mem).documentElement
    return newdoc

This was just a lot of searching, so if anyone knows what should I/we do next, please help.
« Last Edit: October 15, 2009, 08:32:23 pm by anian » Logged
Posts: 1

View Profile
« Reply #2 on: July 19, 2010, 09:30:35 pm »


I had the same seemingly-nonexistent "xpath" problem, and I was able to solve it. I'm running Ubuntu 10.04, Blender 2.49b, Crystal Space 1.4.0.

I followed the (first) link anian mentioned and looked in the python source file ~/.blender/scripts/bpymodules/b2cs/, but found no mention of "xml.xpath" (and certainly no "import xml.xpath") but instead the function "xml_xpath". I was able to find the declaration of that in ~/.blender/scripts/bpymodules/b2cs/, which also had the elusive "import xml.xpath". However, that line was surrounded by dire warnings not to comment it out (I'm not kidding), which is what that archived email had suggested, so I looked near it and noticed that it was attempting to load various Python-based XML parsers, including 4Suite and PyXML (in that order). I searched PyXML in my package manager to no avail, but I found 4Suite and installed it and that fixed the problem. Blender now opens a "Blender to CrystalSpace UI" in its scripts window with a bunch of export-controlling buttons, etc., instead of an unhelpful "Check console" error message.

I hope this is helpful to you too; I suspect the file structure is similar on Windows.

Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 7.239 seconds with 15 queries.