OSArch Community

IfcTester - Error on IDS with classification system

  1. C

    Hi Dion @Moult,

    I'm really exited about IfcTester, discovering its possibilities and eager to implement this within my company. However, when I run my IDS with IfcTester I get this error:

    _Traceback (most recent call last):

    File "C:\Users...\PycharmProjects......\ifc_validator.py", line 42, in <module>

    my_ids.validate(my_ifc)

    File "C:\Users...\PycharmProjects....venv\lib\site-packages\ifctester\ids.py", line 118, in validate

    specification.validate(ifc_file, filter_version=filter_version)

    File "C:\Users...\PycharmProjects....venv\lib\site-packages\ifctester\ids.py", line 230, in validate

    facet.failed_reasons.append(str(result))

    TypeError: str returned non-string (type NoneType)_

    I created my IDS with the following code:

    restriction = ids.Restriction(options={"enumeration": classifications}, base="string")

    my_spec.requirements.append(ids.Classification(value=restriction, system="NL-SfB", minOccurs=1, maxOccurs="unbounded"))

    my_ids.specifications.append(my_spec)

    The IDS works on IFC's where a classification system "NL-SfB" is present, but crashes when it is not. Wouldn't IfcTester just return a failed check instead of a Traceback error? Or am I missing something?

    EXAMPLE: when passing

    BIM basis ILS - 3.6 Classificatiesystematiek

    [PASS] (149/149) *Classificatiecode.

    Applies to:
    
        All {'enumeration': ['IFCACTUATOR', ... , 'IFCWINDOWSTANDARDCASE']} data
    
    Requirements:
    
        Shall have a NL-SfB reference of {'enumeration': ['11.10',  ... , '90.83']}

    Cheers,

    Wout

  2. M
  3. C

    Thanks for the quick reply, much appreciated! And no I did not report the bug, but I'll keep in mind at reporting on github next time.

  4. C

    @Moult , tested your bugfix and it works like a charm, Thanks!

Login or Register to reply.