Re: [Modeling-users] Problems generating python code from xml schema
Status: Abandoned
Brought to you by:
sbigaret
|
From: Sebastien B. <sbi...@us...> - 2006-01-02 14:48:45
|
Hi Richard & all,
Richard Smith <ri...@vo...> wrote:
> Hi,
>=20
> I'm just playing with the Modeller at the moment, and have encountered an
> issue generating a model from an XML file.
>=20
> Am using all published/recommended/current versions of libraries.
>=20
> The only complication is that some of the libraries are in my home dir,
> others are in the system python library.
Having libs installed in different places is definitely not a pb.
>=20
> File
> "/usr/lib/python2.4/site-packages/Modeling/ModelMasons/Python_bricks/mode=
l.py",
> line 80, in respond
> SL =3D self._searchList
> AttributeError: model instance has no attribute '_searchList'
>=20
> Any ideas?
I assume you're getting this w/ mdl_generate_python_code.py, right?
That's strange, it seems that's something's gone wrong w/ Cheetah
compiled files.
Could you please give us:
- the version of cheetah you use
python -c "import Cheetah; print Cheetah.Version"
- the 20 first lines of your file
/usr/lib/python2.4/site-packages/Modeling/ModelMasons/Python_bricks/model=
.py
(even if the solution I propose below works for you --I'd like to have
the informations in case the problem shows up again)
I suspect (even though I was unable to reproduce the problem here) that
the version of Cheetah used by python at runtime is not compatible w/
the one with which the bricks were compiled before being packaged.
Did you install Cheetah after installing Modeling? Was/is
'cheetah-compile' in your path when installing w/ 'python setup.py
install --prefix=3D...' ?
You can tell that the setup failed to use cheetah if you get the
following message:
Warning: compilation of cheetah templates failed: they
may be absent, or cheetah-compile is not available.
=3D> Using the already compiled templates
I suggest that you re-install Modeling w/ setup.py; you won't break
anything, and if you do not get the above-mentioned warning messages
you're sure that the "bricks" have been recompiled. Hopefully the
problem will disappear, then.
-- S=E9bastien.
|