[Cubicweb] NameError: name 'ENGINE' is not defined

Nicolas Chauvat nicolas.chauvat at logilab.fr
Sat Jul 18 17:23:01 CEST 2009


On Sat, Jul 18, 2009 at 07:58:26PM +0530, Dhaval Sharma wrote:
> Yes , cubicweb.common is there but its not able to read ENGINE
> 
> ENGINE = TransformEngine()
> ENGINE.add_transform(rest_to_html())
> ENGINE.add_transform(html_to_html())
> 
> The above three lines in mtransform dont work and thus could be ENGINE is
> not defined

You need to figure out why the following code::

  try:
      from cubicweb.common.uilib import printable_value, soup2xhtml
      from cubicweb.common.mixins import MI_REL_TRIGGERS
      from cubicweb.common.mttransforms import ENGINE
  except ImportError:
      # missing -common
      MI_REL_TRIGGERS = {}

that you find at the top of cubicweb/entity.py is raising an
exception.

Doing it remotely is difficult.

You may want to start by removing the try/except and replace the above
with::

  from cubicweb.common.uilib import printable_value, soup2xhtml
  from cubicweb.common.mixins import MI_REL_TRIGGERS
  from cubicweb.common.mttransforms import ENGINE

the run the program again.

-- 
Nicolas Chauvat

logilab.fr - services en informatique scientifique et gestion de connaissances  



More information about the Cubicweb mailing list