[Cubicweb] Error while defining a relation

GEFFROY Dominique INSERM dominique.geffroy at cea.fr
Thu Jul 7 14:29:09 CEST 2011


Dear Cubicweb experts,

I'm trying to define a new schema for a cube but I get an error about a RelationDefinition that I don't understand.

Here is my RelationDefinition:

class has_file(RelationDefinition):
    subject = "*"
    object = 'String'
    cardinality='**'
    composite="subject"

And here is the error while creating a database for an instance of the cube:

Initializing the system database
--------------------------------
-> creating tables  [....................]
-> inserting default user and default groups.
Traceback (most recent call last):
  File "/usr/bin/cubicweb-ctl", line 4, in <module>
    run(sys.argv[1:])
  File "/usr/lib/python2.6/dist-packages/cubicweb/cwctl.py", line 982, in run
    CWCTL.run(args)
  File "/usr/lib/pymodules/python2.6/logilab/common/clcommands.py", line 133, in run
    sys.exit(command.main_run(args, rcfile))
  File "/usr/lib/pymodules/python2.6/logilab/common/clcommands.py", line 262, in main_run
    self.run(args)
  File "/usr/lib/python2.6/dist-packages/cubicweb/server/serverctl.py", line 393, in run
    config.appid])
  File "/usr/lib/pymodules/python2.6/logilab/common/clcommands.py", line 133, in run
    sys.exit(command.main_run(args, rcfile))
  File "/usr/lib/pymodules/python2.6/logilab/common/clcommands.py", line 262, in main_run
    self.run(args)
  File "/usr/lib/python2.6/dist-packages/cubicweb/server/serverctl.py", line 455, in run
    init_repository(config, drop=self.config.drop)
  File "/usr/lib/python2.6/dist-packages/cubicweb/server/__init__.py", line 193, in init_repository
    repo.vreg.set_schema(repo.schema)
  File "/usr/lib/python2.6/dist-packages/cubicweb/cwvreg.py", line 581, in set_schema
    self.reload(self.config.vregistry_path(), force_reload=False)
  File "/usr/lib/python2.6/dist-packages/cubicweb/cwvreg.py", line 609, in reload
    self.register_objects(path)
  File "/usr/lib/python2.6/dist-packages/cubicweb/cwvreg.py", line 667, in register_objects
    path, self.config.extrapath)
  File "/usr/lib/python2.6/dist-packages/cubicweb/vregistry.py", line 421, in register_objects
    self.initialization_completed()
  File "/usr/lib/python2.6/dist-packages/cubicweb/cwvreg.py", line 724, in initialization_completed
    rtag.init(self.schema, check=self.config.cleanup_interface_sobjects)
  File "/usr/lib/python2.6/dist-packages/cubicweb/rtags.py", line 104, in init
    self.apply(schema, self._initfunc)
  File "/usr/lib/python2.6/dist-packages/cubicweb/rtags.py", line 116, in apply
    func(self, sschema, rschema, oschema, role)
  File "/usr/lib/python2.6/dist-packages/cubicweb/web/uicfg.py", line 438, in init_actionbox_appearsin_addmenu
    if not rdef.role_cardinality(role) in '?1' and rdef.composite == role:
AttributeError: 'RelationDefinitionSchema' object has no attribute 'composite'


I don't understand why it complains about this composite attribute, I defined it in my class. Did I do something wrong ?

Thanks for you help,

Dominique Geffroy


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cubicweb.org/pipermail/cubicweb/attachments/20110707/df2bd525/attachment-0164.html>


More information about the Cubicweb mailing list