Re: How to create Object and Data Properties dynamically ?

Posted by jui guram on
URL: http://owlready.306.s1.nabble.com/How-to-create-Object-and-Data-Properties-dynamically-tp244p379.html

Hi,

I am also trying to create data property dynamically.Here is my code.

with onto:
        ontology_data_property = types.new_class('custNo',  (DataProperty,))
        ontology_data_property.range = [int]
        ontology_data_property.domain = ['customers']

when i run this I get error in the domain line.

AttributeError: 'str' object has no attribute 'storid'

without mentioning the domain it works well.

Regards,
Jui