Crystal Space
Welcome, Guest. Please login or register.
July 23, 2014, 03:12:32 pm

Login with username, password and session length
Search:     Advanced search
9005 Posts in 2043 Topics by 8220 Members
Latest Member: Igymatta
* 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 2238 times)
Weaponx69
Newbie
*
Posts: 5


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

Hi,
    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 http://externos.grupoikusnet.com/deb/crystalspace/ intrepid main

to install;

celstart1.9
libcrystalspace1.4-dev
libcel1.9-dev
swig

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;

http://blenderartists.org/forum/showthread.php?t=124781

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/run.py:5: 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/crystalspace_export.py", line 46, in <module>
    import b2cs
  File "/home/weaponx69/.blender/scripts/bpymodules/b2cs/__init__.py", line 49, in <module>
    import defaults
  File "/home/weaponx69/.blender/scripts/bpymodules/b2cs/defaults.py", line 5, in <module>
    import b2cs.metadata
  File "/home/weaponx69/.blender/scripts/bpymodules/b2cs/metadata.py", line 475, in <module>
    b2cs.prop.wid_keys = UiProperties()
  File "/home/weaponx69/.blender/scripts/bpymodules/b2cs/metadata.py", line 444, in __init__
    self.Refresh()
  File "/home/weaponx69/.blender/scripts/bpymodules/b2cs/metadata.py", line 447, in Refresh
    self.loadFromMetadata()
  File "/home/weaponx69/.blender/scripts/bpymodules/b2cs/metadata.py", line 450, in loadFromMetadata
    for wid in world_metadata.getNodes():
  File "/home/weaponx69/.blender/scripts/bpymodules/b2cs/metadata.py", line 234, in getNodes
    sect = self.getSection()
  File "/home/weaponx69/.blender/scripts/bpymodules/b2cs/metadata.py", line 228, in getSection
    root = self.getRoot()
  File "/home/weaponx69/.blender/scripts/bpymodules/b2cs/metadata.py", line 206, in getRoot
    propval = xpath(self.internalroot,"//prop[@name='metadata_file']/@value")
  File "/home/weaponx69/.blender/scripts/bpymodules/b2cs/xmlutils.py", 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.
Logged
anian
Newbie
*
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:
http://www.mail-archive.com/crystal-main@lists.sourceforge.net/msg00015.html

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):
Quote
- name: PYTHONPATH
- value: C:\PYTHON22;C:\PYTHON22\DLLS;C:\PYTHON22\LIB;C:\PYTHON22\LIB\LIB-TK

but it still didnt work cause soon in the console another error appeared:
Code:
rest of the adress...\b2cs\xmlutils.py", 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:
Code:
# loads a xml dom from a string
def xml_parseString(mem):
    try:
        newdoc = xml.dom.minidom.parseString(mem).documentElement
    except:
        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
lp47
Newbie
*
Posts: 1


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

Hi,

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/csxml.py, 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/xmlutils.py, 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.

lp47
Logged
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.181 seconds with 15 queries.