I’m having some trouble importing expat, an xml parser. My site stuff seems to be configured properly, as I can get all other modules I’ve tried working well (os etc), although the sys.path does contain one directory that does not exist (/usr/lib/python2.2/lib-tk)
Anyhow, when I say:
from xml.parsers import expat
I get this error:
Using a clean Global Dictionary.
IMPORT_xmesh:155: SyntaxWarning: name 'update_normals' is used prior to global declaration
Traceback (most recent call last):
File "IMPORT_xmesh", line 39, in ?
File "/usr/lib/python2.2/site-packages/_xmlplus/parsers/expat.py", line 4, in
?
from pyexpat import *
ImportError: /usr/lib/python2.2/lib-dynload/pyexpat.so: undefined symbol: PyUnicodeUCS4_Decode
'import site' failed; use -v for traceback
This works fine in normal python (without the error), so I think it must be some kind of path problem…
I’m running 2.28c and my sys.path (within blender) reads:
okay, I’m guessing with the overwhelming response that my post falls in to one of the following categories:
– I have done something extroadinarilly stupid and don’t deserve a response
– My problem is one that no-one else can duplicate, so no-one is able to offer any help
– My problem is one that no-one else has come across, and no-one can see a situation in which they would need to do what I’m doing, so no-one thinks it’s worth the effort to help track down
– Or, after reading my post, people instantaneously forget all they have known about blender and python, and do not regain this knowledge until they close down the page
I’m leaning towards 3…but could I have at least input though about whether anyone else can duplicate it…please, just someone with a full python instalation just run that import command in a blender script and see it it works properly…please?
yeah…thanks theeth, I tried that :-/ doesn’t make a difference…
I would have thought that having the pyton path stuff right would get rid of the need for a recompile…would it really make a difference? I’ll give it a shot anyway
I also heard from someone else today (after prodding the forum ) who suggested that it was pyXML being not compiled for the right unicode mode…(he came across this before)…and that to fix you might need to recompile python (?)…
recompiling blender seems more sensible, should have the same effect, and will (if blender is as hard to compile as I’ve heard) grow me some hair on my chest so that’s what I’ll do