Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IAttributeIndex broken under Python 3 #7

Closed
jamadden opened this issue May 8, 2017 · 0 comments · Fixed by #8
Closed

IAttributeIndex broken under Python 3 #7

jamadden opened this issue May 8, 2017 · 0 comments · Fixed by #8

Comments

@jamadden
Copy link
Member

jamadden commented May 8, 2017

This is basically the same error as #5: field_name should be defined to be NativeStringLine instead of BytesLine.

This shows up testing zc.catalog:

      File "///python3.5/site-packages/zope/app/form/browser/add.py", line 111, in createAndAdd
        content = self.add(content)
      File "///python3.5/site-packages/zope/app/form/browser/add.py", line 134, in add
        return self.context.add(content)
      File "///python3.5/site-packages/zope/app/container/browser/adding.py", line 78, in add
        container[name] = content
      File "///python3.5/site-packages/zope/container/btree.py", line 102, in __setitem__
        setitem(self, self._setitemf, key, value)
      File "///python3.5/site-packages/zope/container/contained.py", line 571, in setitem
        notify(event)
      File "///python3.5/site-packages/zope/event/__init__.py", line 31, in notify
        subscriber(event)
      File "///python3.5/site-packages/zope/component/event.py", line 27, in dispatch
        component_subscribers(event, None)
      File "///python3.5/site-packages/zope/component/_api.py", line 139, in subscribers
        return sitemanager.subscribers(objects, interface)
      File "///python3.5/site-packages/zope/interface/registry.py", line 442, in subscribers
        return self.adapters.subscribers(objects, provided)
      File "///python3.5/site-packages/zope/interface/adapter.py", line 598, in subscribers
        subscription(*objects)
      File "///python3.5/site-packages/zope/component/event.py", line 36, in objectEventNotify
        component_subscribers((event.object, event), None)
      File "///python3.5/site-packages/zope/component/_api.py", line 139, in subscribers
        return sitemanager.subscribers(objects, interface)
      File "///python3.5/site-packages/zope/interface/registry.py", line 442, in subscribers
        return self.adapters.subscribers(objects, provided)
      File "///python3.5/site-packages/zope/interface/adapter.py", line 598, in subscribers
        subscription(*objects)
      File "///python3.5/site-packages/zope/catalog/catalog.py", line 173, in indexAdded
        index.__parent__.updateIndex(index)
      File "///python3.5/site-packages/zope/catalog/catalog.py", line 100, in updateIndex
        index.index_doc(uid, obj)
      File "///python3.5/site-packages/zope/catalog/attribute.py", line 130, in index_doc
        value = getattr(object, self.field_name, None)
    TypeError: getattr(): attribute name must be string
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant