Skip to content

Unicode.customize(min_len=6) throws exception #272

@FelixSchwarz

Description

@FelixSchwarz

I'm using the current git master and I noticed that sometimes Unicode.customize throws an exception. For example:

  Unicode.customize(min_len=6)

leads to:

  File "…/spyne/interface/xml_schema/model.py", line 152, in complex_add
    document.add(v, tags)
  File "…/spyne/interface/xml_schema/_base.py", line 127, in add
    handler(self, cls, tags)
  File "…/spyne/interface/xml_schema/model.py", line 78, in simple_add
    interface.get_restriction_tag(cls)
  File "…/spyne/interface/xml_schema/_base.py", line 131, in get_restriction_tag
    return handler(self, cls)
  File "…/spyne/interface/xml_schema/model.py", line 272, in unicode_get_restriction_tag
    restriction = simple_get_restriction_tag(interface, cls)
  File "…/spyne/interface/xml_schema/model.py", line 66, in simple_get_restriction_tag
    restriction.set('base', cls.__extends__.get_type_name_ns(
AttributeError: 'NoneType' object has no attribute 'get_type_name_ns'

However the "shortcut" approach works:

Unicode(min_len=6)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions