• Remember Mailing List

  • custommember based on sample remember gives KeyError: "Category set 'CustomMember_membrane_workflow_states' does not exist"

    from "David Bain" on 2008-07-14 11:47
    I'm working with a Custom member based on sampleremember
    (http://svn.plone.org/svn/collective/Products.remember/trunk/Products/remember/examples/sampleremember/
    )
    
    It was created basically using search and replace based on sampleremember
    When I try to install it via the portal_setup > import
    
    I get the following traceback
    
    .../plone/portal_setup/manage_importAllSteps
    Traceback (innermost last):
      Module ZPublisher.Publish, line 119, in publish
      Module ZPublisher.mapply, line 88, in mapply
      Module ZPublisher.Publish, line 42, in call_object
      Module Products.GenericSetup.tool, line 526, in manage_importAllSteps
      Module Products.GenericSetup.tool, line 322, in runAllImportStepsFromProfile
       - __traceback_info__: profile-Products.CustomMember:default
      Module Products.GenericSetup.tool, line 1028, in _runImportStepsFromContext
      Module Products.GenericSetup.tool, line 987, in _doRunImportStep
       - __traceback_info__: membranetool
      Module Products.membrane.exportimport.membranetool, line 157, in
    importMembraneTool
      Module Products.GenericSetup.utils, line 786, in importObjects
       - __traceback_info__: membrane_tool
      Module Products.GenericSetup.utils, line 542, in _importBody
      Module Products.remember.exportimport.membranetool, line 23, in _importNode
      Module Products.membrane.exportimport.membranetool, line 48, in _importNode
      Module Products.membrane.exportimport.membranetool, line 117, in
    _initMembraneTypes
      Module Products.membrane.factories.categorymapper, line 93, in
    replaceCategoryValues
      Module Products.membrane.factories.categorymapper, line 36, in _getCatSet
    KeyError: "Category set 'CustomMember_membrane_workflow_states' does not exist"
    http://svn.plone.org/svn/collective/Products.remember/trunk/Products/remember/examples/sampleremember/profiles/default/membrane_tool.xml
    
    I found an interesting work around:
    changing my profile's membrane_tool.xml from this:
    
     <?xml version="1.0"?>
     <object name="membrane_tool" meta_type="MembraneTool">
      <membrane-type name="SampleRemember">
        <active-workflow-state name="public" />
        <active-workflow-state name="private" />
      </membrane-type>
     </object>
    
    To this:
    
    <?xml version="1.0"?>
    <object name="membrane_tool" meta_type="MembraneTool">
      <membrane-type name="SampleRemember">
    <!--    <active-workflow-state name="public" />
        <active-workflow-state name="private" />
    -->
    </membrane-type>
    </object>
    
    got rid of the error.
    Based on the traceback, and my investigation, there seems to be an
    issue with membrane's category mapper, I haven't dug deep enough to be
    sure, but I figure someone more familiar might know what's going in.
    
    For the moment, I'll map active member states manually TTW.
    
    Thread Outline:
  • Re: custommember based on sample remember gives KeyError: "Category set 'CustomMember_membrane_workflow_states' does not exist"

    from ra on 2008-07-14 13:53
    David Bain wrote:
    > I'm working with a Custom member based on sampleremember
    > (http://svn.plone.org/svn/collective/Products.remember/trunk/Products/remember/examples/sampleremember/
    > )
    > 
    > It was created basically using search and replace based on sampleremember
    > When I try to install it via the portal_setup > import
    > 
    > I get the following traceback
    > 
    > .../plone/portal_setup/manage_importAllSteps
    > Traceback (innermost last):
    >   Module ZPublisher.Publish, line 119, in publish
    >   Module ZPublisher.mapply, line 88, in mapply
    >   Module ZPublisher.Publish, line 42, in call_object
    >   Module Products.GenericSetup.tool, line 526, in manage_importAllSteps
    >   Module Products.GenericSetup.tool, line 322, in runAllImportStepsFromProfile
    >    - __traceback_info__: profile-Products.CustomMember:default
    >   Module Products.GenericSetup.tool, line 1028, in _runImportStepsFromContext
    >   Module Products.GenericSetup.tool, line 987, in _doRunImportStep
    >    - __traceback_info__: membranetool
    >   Module Products.membrane.exportimport.membranetool, line 157, in
    > importMembraneTool
    >   Module Products.GenericSetup.utils, line 786, in importObjects
    >    - __traceback_info__: membrane_tool
    >   Module Products.GenericSetup.utils, line 542, in _importBody
    >   Module Products.remember.exportimport.membranetool, line 23, in _importNode
    >   Module Products.membrane.exportimport.membranetool, line 48, in _importNode
    >   Module Products.membrane.exportimport.membranetool, line 117, in
    > _initMembraneTypes
    >   Module Products.membrane.factories.categorymapper, line 93, in
    > replaceCategoryValues
    >   Module Products.membrane.factories.categorymapper, line 36, in _getCatSet
    > KeyError: "Category set 'CustomMember_membrane_workflow_states' does not exist"
    > http://svn.plone.org/svn/collective/Products.remember/trunk/Products/remember/examples/sampleremember/profiles/default/membrane_tool.xml
    > 
    > I found an interesting work around:
    > changing my profile's membrane_tool.xml from this:
    > 
    >  <?xml version="1.0"?>
    >  <object name="membrane_tool" meta_type="MembraneTool">
    >   <membrane-type name="SampleRemember">
    >     <active-workflow-state name="public" />
    >     <active-workflow-state name="private" />
    >   </membrane-type>
    >  </object>
    > 
    > To this:
    > 
    > <?xml version="1.0"?>
    > <object name="membrane_tool" meta_type="MembraneTool">
    >   <membrane-type name="SampleRemember">
    > <!--    <active-workflow-state name="public" />
    >     <active-workflow-state name="private" />
    > -->
    > </membrane-type>
    > </object>
    > 
    > got rid of the error.
    
    hrm.  it seems weird to me that this worked.  not sure why that is.
    
    > Based on the traceback, and my investigation, there seems to be an
    > issue with membrane's category mapper, I haven't dug deep enough to be
    > sure, but I figure someone more familiar might know what's going in.
    
    the issue is that you've created a new type, but you haven't defined which 
    workflow states are active for your custom type.
    
    > For the moment, I'll map active member states manually TTW.
    
    you should instead modify your GS profile so that the member states for your 
    type are being specified:
    
    <?xml version="1.0"?>
    <object name="membrane_tool" meta_type="MembraneTool">
      <membrane-type name="CustomMember">
        <active-workflow-state name="public" />
        <active-workflow-state name="private" />
      </membrane-type>
    </object>
    
    note the different membrane-type setting.
    
    -r
    
    • Re: custommember based on sample remember gives KeyError: "Category set 'CustomMember_membrane_workflow_states' does not exist"

      from "David Bain" on 2008-07-14 17:22
      Yes, that's actually what I had (NOT The SampleRemember type). And I
      got the errors mentioned.
      
      
      On Mon, Jul 14, 2008 at 12:54 PM, Rob Miller <robm@...> wrote:
      > David Bain wrote:
      >>
      >> I'm working with a Custom member based on sampleremember
      >>
      >> (http://svn.plone.org/svn/collective/Products.remember/trunk/Products/remember/examples/sampleremember/
      >> )
      >>
      >> It was created basically using search and replace based on sampleremember
      >> When I try to install it via the portal_setup > import
      >>
      >> I get the following traceback
      >>
      >> .../plone/portal_setup/manage_importAllSteps
      >> Traceback (innermost last):
      >>  Module ZPublisher.Publish, line 119, in publish
      >>  Module ZPublisher.mapply, line 88, in mapply
      >>  Module ZPublisher.Publish, line 42, in call_object
      >>  Module Products.GenericSetup.tool, line 526, in manage_importAllSteps
      >>  Module Products.GenericSetup.tool, line 322, in
      >> runAllImportStepsFromProfile
      >>   - __traceback_info__: profile-Products.CustomMember:default
      >>  Module Products.GenericSetup.tool, line 1028, in
      >> _runImportStepsFromContext
      >>  Module Products.GenericSetup.tool, line 987, in _doRunImportStep
      >>   - __traceback_info__: membranetool
      >>  Module Products.membrane.exportimport.membranetool, line 157, in
      >> importMembraneTool
      >>  Module Products.GenericSetup.utils, line 786, in importObjects
      >>   - __traceback_info__: membrane_tool
      >>  Module Products.GenericSetup.utils, line 542, in _importBody
      >>  Module Products.remember.exportimport.membranetool, line 23, in
      >> _importNode
      >>  Module Products.membrane.exportimport.membranetool, line 48, in
      >> _importNode
      >>  Module Products.membrane.exportimport.membranetool, line 117, in
      >> _initMembraneTypes
      >>  Module Products.membrane.factories.categorymapper, line 93, in
      >> replaceCategoryValues
      >>  Module Products.membrane.factories.categorymapper, line 36, in _getCatSet
      >> KeyError: "Category set 'CustomMember_membrane_workflow_states' does not
      >> exist"
      >>
      >> http://svn.plone.org/svn/collective/Products.remember/trunk/Products/remember/examples/sampleremember/profiles/default/membrane_tool.xml
      >>
      >> I found an interesting work around:
      >> changing my profile's membrane_tool.xml from this:
      >>
      >>  <?xml version="1.0"?>
      >>  <object name="membrane_tool" meta_type="MembraneTool">
      >>  <membrane-type name="SampleRemember">
      >>    <active-workflow-state name="public" />
      >>    <active-workflow-state name="private" />
      >>  </membrane-type>
      >>  </object>
      >>
      >> To this:
      >>
      >> <?xml version="1.0"?>
      >> <object name="membrane_tool" meta_type="MembraneTool">
      >>  <membrane-type name="SampleRemember">
      >> <!--    <active-workflow-state name="public" />
      >>    <active-workflow-state name="private" />
      >> -->
      >> </membrane-type>
      >> </object>
      >>
      >> got rid of the error.
      >
      > hrm.  it seems weird to me that this worked.  not sure why that is.
      >
      >> Based on the traceback, and my investigation, there seems to be an
      >> issue with membrane's category mapper, I haven't dug deep enough to be
      >> sure, but I figure someone more familiar might know what's going in.
      >
      > the issue is that you've created a new type, but you haven't defined which
      > workflow states are active for your custom type.
      >
      >> For the moment, I'll map active member states manually TTW.
      >
      > you should instead modify your GS profile so that the member states for your
      > type are being specified:
      >
      > <?xml version="1.0"?>
      > <object name="membrane_tool" meta_type="MembraneTool">
      >  <membrane-type name="CustomMember">
      >   <active-workflow-state name="public" />
      >   <active-workflow-state name="private" />
      >  </membrane-type>
      > </object>
      >
      > note the different membrane-type setting.
      >
      > -r
      >
      >
      > --
      > Archive:
      > http://www.openplans.org/projects/remember/lists/remember/archive/2008/07/1216057983764
      > To unsubscribe send an email with subject "unsubscribe" to
      > remember@....  Please contact
      > remember-manager@... for questions.
      >
      >
      
      • Re: custommember based on sample remember gives KeyError: "Category set 'CustomMember_membrane_workflow_states' does not exist"

        from Claudio Battaglino on 2008-07-15 03:51
        David Bain ha scritto:
        > Yes, that's actually what I had (NOT The SampleRemember type). And I
        > got the errors mentioned.
        >
        >   
        
        I had the same error installing my custom content type:
        
        KeyError: "Category set 'EUMember_membrane_workflow_states' does not exist"
        
        
        The strange is that, while I was debugging the problem, trying to 
        install the custom member for the umpteenth time, it worked.
        So now I don't know which was the problem.
        
        I'm using:
        Plone: 3.1
        Remember: 1.0rc1
        Membrane: 1.1b1
        
        claudio
        
        
      • Re: custommember based on sample remember gives KeyError: "Category set 'CustomMember_membrane_workflow_states' does not exist"

        from ra on 2008-07-17 20:27
        David Bain wrote:
        > Yes, that's actually what I had (NOT The SampleRemember type). And I
        > got the errors mentioned.
        
        okay, i've got a few minutes to look at this now...
        
        > On Mon, Jul 14, 2008 at 12:54 PM, Rob Miller <robm@...> wrote:
        >> David Bain wrote:
        >>> I'm working with a Custom member based on sampleremember
        >>>
        >>> (http://svn.plone.org/svn/collective/Products.remember/trunk/Products/remember/examples/sampleremember/
        >>> )
        >>>
        >>> It was created basically using search and replace based on sampleremember
        >>> When I try to install it via the portal_setup > import
        >>>
        >>> I get the following traceback
        >>>
        >>> .../plone/portal_setup/manage_importAllSteps
        >>> Traceback (innermost last):
        >>>  Module ZPublisher.Publish, line 119, in publish
        >>>  Module ZPublisher.mapply, line 88, in mapply
        >>>  Module ZPublisher.Publish, line 42, in call_object
        >>>  Module Products.GenericSetup.tool, line 526, in manage_importAllSteps
        >>>  Module Products.GenericSetup.tool, line 322, in
        >>> runAllImportStepsFromProfile
        >>>   - __traceback_info__: profile-Products.CustomMember:default
        >>>  Module Products.GenericSetup.tool, line 1028, in
        >>> _runImportStepsFromContext
        >>>  Module Products.GenericSetup.tool, line 987, in _doRunImportStep
        >>>   - __traceback_info__: membranetool
        >>>  Module Products.membrane.exportimport.membranetool, line 157, in
        >>> importMembraneTool
        >>>  Module Products.GenericSetup.utils, line 786, in importObjects
        >>>   - __traceback_info__: membrane_tool
        >>>  Module Products.GenericSetup.utils, line 542, in _importBody
        >>>  Module Products.remember.exportimport.membranetool, line 23, in
        >>> _importNode
        >>>  Module Products.membrane.exportimport.membranetool, line 48, in
        >>> _importNode
        >>>  Module Products.membrane.exportimport.membranetool, line 117, in
        >>> _initMembraneTypes
        
        i think right here is where the error is.  looking at the _initMembraneTypes 
        method in the GS importer, it's supposed to:
        
        - read in the membrane type from the XML
        
        - check if the membrane type is already registered
        
        - register it as a membrane type, if not, which in turn:
           * fires a MembraneTypeRegisteredEvent
           * which has a subscriber in Products.membrane.factories.statusmapper that 
        initializes the status map stuff
        
        - read in the "active" workflow states from the XML
        
        - set the active workflow states in the status map storage
        
        your hitting the error in the last step, because the status map data 
        structures haven't been initialized, but that should have happened in the 
        first step.
        
        hmmm.. it looks like the conditionals in there don't handle the case where the 
        member type is registered but the status mapper hasn't yet been initialized. 
        that shouldn't be happening, but if it is it'd generate the error you're seeing.
        
        there... i just made a commit to the Products.membrane trunk, r68584 
        (http://dev.plone.org/collective/changeset/68584).  can you try that and see 
        if it helps?
        
        -r
        
        >>>  Module Products.membrane.factories.categorymapper, line 93, in
        >>> replaceCategoryValues
        >>>  Module Products.membrane.factories.categorymapper, line 36, in _getCatSet
        >>> KeyError: "Category set 'CustomMember_membrane_workflow_states' does not
        >>> exist"
        >>>
        >>> http://svn.plone.org/svn/collective/Products.remember/trunk/Products/remember/examples/sampleremember/profiles/default/membrane_tool.xml
        >>>
        
        • Re: custommember based on sample remember gives KeyError: "Category set 'CustomMember_membrane_workflow_states' does not exist"

          from "David Bain" on 2008-07-17 23:43
          I traced the problem to Membrane (forgot to post it on the list).
          Trying it now with the new trunk.
          
          On Thu, Jul 17, 2008 at 7:28 PM, Rob Miller <robm@...> wrote:
          > David Bain wrote:
          >>
          >> Yes, that's actually what I had (NOT The SampleRemember type). And I
          >> got the errors mentioned.
          >
          > okay, i've got a few minutes to look at this now...
          >
          >> On Mon, Jul 14, 2008 at 12:54 PM, Rob Miller <robm@...> wrote:
          >>>
          >>> David Bain wrote:
          >>>>
          >>>> I'm working with a Custom member based on sampleremember
          >>>>
          >>>>
          >>>> (http://svn.plone.org/svn/collective/Products.remember/trunk/Products/remember/examples/sampleremember/
          >>>> )
          >>>>
          >>>> It was created basically using search and replace based on
          >>>> sampleremember
          >>>> When I try to install it via the portal_setup > import
          >>>>
          >>>> I get the following traceback
          >>>>
          >>>> .../plone/portal_setup/manage_importAllSteps
          >>>> Traceback (innermost last):
          >>>>  Module ZPublisher.Publish, line 119, in publish
          >>>>  Module ZPublisher.mapply, line 88, in mapply
          >>>>  Module ZPublisher.Publish, line 42, in call_object
          >>>>  Module Products.GenericSetup.tool, line 526, in manage_importAllSteps
          >>>>  Module Products.GenericSetup.tool, line 322, in
          >>>> runAllImportStepsFromProfile
          >>>>  - __traceback_info__: profile-Products.CustomMember:default
          >>>>  Module Products.GenericSetup.tool, line 1028, in
          >>>> _runImportStepsFromContext
          >>>>  Module Products.GenericSetup.tool, line 987, in _doRunImportStep
          >>>>  - __traceback_info__: membranetool
          >>>>  Module Products.membrane.exportimport.membranetool, line 157, in
          >>>> importMembraneTool
          >>>>  Module Products.GenericSetup.utils, line 786, in importObjects
          >>>>  - __traceback_info__: membrane_tool
          >>>>  Module Products.GenericSetup.utils, line 542, in _importBody
          >>>>  Module Products.remember.exportimport.membranetool, line 23, in
          >>>> _importNode
          >>>>  Module Products.membrane.exportimport.membranetool, line 48, in
          >>>> _importNode
          >>>>  Module Products.membrane.exportimport.membranetool, line 117, in
          >>>> _initMembraneTypes
          >
          > i think right here is where the error is.  looking at the _initMembraneTypes
          > method in the GS importer, it's supposed to:
          >
          > - read in the membrane type from the XML
          >
          > - check if the membrane type is already registered
          >
          > - register it as a membrane type, if not, which in turn:
          >  * fires a MembraneTypeRegisteredEvent
          >  * which has a subscriber in Products.membrane.factories.statusmapper that
          > initializes the status map stuff
          >
          > - read in the "active" workflow states from the XML
          >
          > - set the active workflow states in the status map storage
          >
          > your hitting the error in the last step, because the status map data
          > structures haven't been initialized, but that should have happened in the
          > first step.
          >
          > hmmm.. it looks like the conditionals in there don't handle the case where
          > the member type is registered but the status mapper hasn't yet been
          > initialized. that shouldn't be happening, but if it is it'd generate the
          > error you're seeing.
          >
          > there... i just made a commit to the Products.membrane trunk, r68584
          > (http://dev.plone.org/collective/changeset/68584).  can you try that and see
          > if it helps?
          >
          > -r
          >
          >>>>  Module Products.membrane.factories.categorymapper, line 93, in
          >>>> replaceCategoryValues
          >>>>  Module Products.membrane.factories.categorymapper, line 36, in
          >>>> _getCatSet
          >>>> KeyError: "Category set 'CustomMember_membrane_workflow_states' does not
          >>>> exist"
          >>>>
          >>>>
          >>>> http://svn.plone.org/svn/collective/Products.remember/trunk/Products/remember/examples/sampleremember/profiles/default/membrane_tool.xml
          >>>>
          >
          >
          > --
          > Archive:
          > http://www.openplans.org/projects/remember/lists/remember/archive/2008/07/1216340826110
          > To unsubscribe send an email with subject "unsubscribe" to
          > remember@....  Please contact
          > remember-manager@... for questions.
          >
          >
          
          • Re: custommember based on sample remember gives KeyError: "Category set 'CustomMember_membrane_workflow_states' does not exist"

            from "David Bain" on 2008-07-17 23:45
            Yup... that did the trick. It now installs flawlessly :).
            
            On Thu, Jul 17, 2008 at 10:43 PM, David Bain <david.bain@...> wrote:
            > I traced the problem to Membrane (forgot to post it on the list).
            > Trying it now with the new trunk.
            >
            > On Thu, Jul 17, 2008 at 7:28 PM, Rob Miller <robm@...> wrote:
            >> David Bain wrote:
            >>>
            >>> Yes, that's actually what I had (NOT The SampleRemember type). And I
            >>> got the errors mentioned.
            >>
            >> okay, i've got a few minutes to look at this now...
            >>
            >>> On Mon, Jul 14, 2008 at 12:54 PM, Rob Miller <robm@...> wrote:
            >>>>
            >>>> David Bain wrote:
            >>>>>
            >>>>> I'm working with a Custom member based on sampleremember
            >>>>>
            >>>>>
            >>>>> (http://svn.plone.org/svn/collective/Products.remember/trunk/Products/remember/examples/sampleremember/
            >>>>> )
            >>>>>
            >>>>> It was created basically using search and replace based on
            >>>>> sampleremember
            >>>>> When I try to install it via the portal_setup > import
            >>>>>
            >>>>> I get the following traceback
            >>>>>
            >>>>> .../plone/portal_setup/manage_importAllSteps
            >>>>> Traceback (innermost last):
            >>>>>  Module ZPublisher.Publish, line 119, in publish
            >>>>>  Module ZPublisher.mapply, line 88, in mapply
            >>>>>  Module ZPublisher.Publish, line 42, in call_object
            >>>>>  Module Products.GenericSetup.tool, line 526, in manage_importAllSteps
            >>>>>  Module Products.GenericSetup.tool, line 322, in
            >>>>> runAllImportStepsFromProfile
            >>>>>  - __traceback_info__: profile-Products.CustomMember:default
            >>>>>  Module Products.GenericSetup.tool, line 1028, in
            >>>>> _runImportStepsFromContext
            >>>>>  Module Products.GenericSetup.tool, line 987, in _doRunImportStep
            >>>>>  - __traceback_info__: membranetool
            >>>>>  Module Products.membrane.exportimport.membranetool, line 157, in
            >>>>> importMembraneTool
            >>>>>  Module Products.GenericSetup.utils, line 786, in importObjects
            >>>>>  - __traceback_info__: membrane_tool
            >>>>>  Module Products.GenericSetup.utils, line 542, in _importBody
            >>>>>  Module Products.remember.exportimport.membranetool, line 23, in
            >>>>> _importNode
            >>>>>  Module Products.membrane.exportimport.membranetool, line 48, in
            >>>>> _importNode
            >>>>>  Module Products.membrane.exportimport.membranetool, line 117, in
            >>>>> _initMembraneTypes
            >>
            >> i think right here is where the error is.  looking at the _initMembraneTypes
            >> method in the GS importer, it's supposed to:
            >>
            >> - read in the membrane type from the XML
            >>
            >> - check if the membrane type is already registered
            >>
            >> - register it as a membrane type, if not, which in turn:
            >>  * fires a MembraneTypeRegisteredEvent
            >>  * which has a subscriber in Products.membrane.factories.statusmapper that
            >> initializes the status map stuff
            >>
            >> - read in the "active" workflow states from the XML
            >>
            >> - set the active workflow states in the status map storage
            >>
            >> your hitting the error in the last step, because the status map data
            >> structures haven't been initialized, but that should have happened in the
            >> first step.
            >>
            >> hmmm.. it looks like the conditionals in there don't handle the case where
            >> the member type is registered but the status mapper hasn't yet been
            >> initialized. that shouldn't be happening, but if it is it'd generate the
            >> error you're seeing.
            >>
            >> there... i just made a commit to the Products.membrane trunk, r68584
            >> (http://dev.plone.org/collective/changeset/68584).  can you try that and see
            >> if it helps?
            >>
            >> -r
            >>
            >>>>>  Module Products.membrane.factories.categorymapper, line 93, in
            >>>>> replaceCategoryValues
            >>>>>  Module Products.membrane.factories.categorymapper, line 36, in
            >>>>> _getCatSet
            >>>>> KeyError: "Category set 'CustomMember_membrane_workflow_states' does not
            >>>>> exist"
            >>>>>
            >>>>>
            >>>>> http://svn.plone.org/svn/collective/Products.remember/trunk/Products/remember/examples/sampleremember/profiles/default/membrane_tool.xml
            >>>>>
            >>
            >>
            >> --
            >> Archive:
            >> http://www.openplans.org/projects/remember/lists/remember/archive/2008/07/1216340826110
            >> To unsubscribe send an email with subject "unsubscribe" to
            >> remember@....  Please contact
            >> remember-manager@... for questions.
            >>
            >>
            >