Skip to content

Instantly share code, notes, and snippets.

@karenc
Created June 27, 2019 18:09
Show Gist options
  • Save karenc/441dbc41e8d0b54ce736851e7203a7cb to your computer and use it in GitHub Desktop.
Save karenc/441dbc41e8d0b54ce736851e7203a7cb to your computer and use it in GitHub Desktop.
2019-05-31T15:29:39 ERROR Zope.SiteErrorLog https://legacy.cnx.org/Members/fsiegeltuch/m68449/content_checkout
Traceback (innermost last):
Module ZPublisher.Publish, line 115, in publish
Module ZPublisher.mapply, line 88, in mapply
Module ZPublisher.Publish, line 41, in call_object
Module Products.CMFFormController.FSControllerPythonScript, line 104, in __call__
Module Products.CMFFormController.Script, line 145, in __call__
Module Products.CMFCore.FSPythonScript, line 108, in __call__
Module Shared.DC.Scripts.Bindings, line 311, in __call__
Module Products.PloneHotfix20110531, line 106, in _patched_bindAndExec
Module Products.PloneHotfix20130618.spamProtect, line 35, in _patched_bindAndExec
Module Products.PloneHotfix20121106.python_scripts, line 63, in _patched_bindAndExec
Module Shared.DC.Scripts.Bindings, line 348, in _bindAndExec
Module Products.CMFCore.FSPythonScript, line 164, in _exec
Module None, line 1, in content_checkout
- <FSControllerPythonScript at /plone/content_checkout used for /plone/Members/fsiegeltuch/m68449>
- Line 1
Module Products.RhaptosModuleEditor.ModuleEditor, line 614, in checkout
Module Products.RhaptosModuleStorage.ModuleView, line 651, in checkout
Module Products.RhaptosModuleStorage.ModuleView, line 669, in _createFile
Module Products.CMFCore.TypesTool, line 934, in constructContent
Module Products.CMFCore.TypesTool, line 343, in constructInstance
Module Products.CMFCore.TypesTool, line 574, in _constructInstance
Module Products.UniFile.File, line 6, in addUnifiedFile
Module OFS.ObjectManager, line 334, in _setObject
Module zope.event, line 23, in notify
Module zope.app.event.dispatching, line 66, in dispatch
Module zope.component, line 181, in subscribers
Module zope.component.site, line 89, in subscribers
Module zope.interface.adapter, line 481, in subscribers
Module zope.app.event.objectevent, line 192, in objectEventNotify
Module zope.component, line 181, in subscribers
Module zope.component.site, line 89, in subscribers
Module zope.interface.adapter, line 481, in subscribers
Module OFS.subscribers, line 114, in dispatchObjectMovedEvent
Module OFS.subscribers, line 144, in callManageAfterAdd
Module Products.Archetypes.BaseContent, line 42, in manage_afterAdd
Module Products.CMFCore.CMFCatalogAware, line 202, in manage_afterAdd
Module Products.RhaptosCatFixes.patch, line 55, in indexObject
Module Products.Archetypes.CatalogMultiplex, line 36, in indexObject
Module Products.CMFPlone.CatalogTool, line 357, in catalog_object
Module Products.CacheSetup.patch, line 100, in catalog_object
Module Products.CacheSetup.patch_utils, line 6, in call
Module Products.ZCatalog.ZCatalog, line 567, in catalog_object
Module Products.ZCatalog.Catalog, line 360, in catalogObject
Module Products.PluginIndexes.DateRangeIndex.DateRangeIndex, line 174, in index_object
Module Products.PluginIndexes.DateRangeIndex.DateRangeIndex, line 384, in _removeForwardIndexEntry
KeyError: -633816452
------
2019-05-31T15:36:45 ERROR Zope.SiteErrorLog https://legacy.cnx.org/Members/fsiegeltuch/m68449/content_checkout
Traceback (innermost last):
Module ZPublisher.Publish, line 115, in publish
Module ZPublisher.mapply, line 88, in mapply
Module ZPublisher.Publish, line 41, in call_object
Module Products.CMFFormController.FSControllerPythonScript, line 104, in __call__
Module Products.CMFFormController.Script, line 145, in __call__
Module Products.CMFCore.FSPythonScript, line 108, in __call__
Module Shared.DC.Scripts.Bindings, line 311, in __call__
Module Products.PloneHotfix20110531, line 106, in _patched_bindAndExec
Module Products.PloneHotfix20130618.spamProtect, line 35, in _patched_bindAndExec
Module Products.PloneHotfix20121106.python_scripts, line 63, in _patched_bindAndExec
Module Shared.DC.Scripts.Bindings, line 348, in _bindAndExec
Module Products.CMFCore.FSPythonScript, line 164, in _exec
Module None, line 1, in content_checkout
- <FSControllerPythonScript at /plone/content_checkout used for /plone/Members/fsiegeltuch/m68449>
- Line 1
Module Products.RhaptosModuleEditor.ModuleEditor, line 614, in checkout
Module Products.RhaptosModuleStorage.ModuleView, line 651, in checkout
Module Products.RhaptosModuleStorage.ModuleView, line 669, in _createFile
Module Products.CMFCore.TypesTool, line 934, in constructContent
Module Products.CMFCore.TypesTool, line 343, in constructInstance
Module Products.CMFCore.TypesTool, line 574, in _constructInstance
Module Products.UniFile.File, line 6, in addUnifiedFile
Module OFS.ObjectManager, line 334, in _setObject
Module zope.event, line 23, in notify
Module zope.app.event.dispatching, line 66, in dispatch
Module zope.component, line 181, in subscribers
Module zope.component.site, line 89, in subscribers
Module zope.interface.adapter, line 481, in subscribers
Module zope.app.event.objectevent, line 192, in objectEventNotify
Module zope.component, line 181, in subscribers
Module zope.component.site, line 89, in subscribers
Module zope.interface.adapter, line 481, in subscribers
Module OFS.subscribers, line 114, in dispatchObjectMovedEvent
Module OFS.subscribers, line 144, in callManageAfterAdd
Module Products.Archetypes.BaseContent, line 42, in manage_afterAdd
Module Products.CMFCore.CMFCatalogAware, line 202, in manage_afterAdd
Module Products.RhaptosCatFixes.patch, line 55, in indexObject
Module Products.Archetypes.CatalogMultiplex, line 36, in indexObject
Module Products.CMFPlone.CatalogTool, line 357, in catalog_object
Module Products.CacheSetup.patch, line 100, in catalog_object
Module Products.CacheSetup.patch_utils, line 6, in call
Module Products.ZCatalog.ZCatalog, line 567, in catalog_object
Module Products.ZCatalog.Catalog, line 360, in catalogObject
Module Products.PluginIndexes.DateRangeIndex.DateRangeIndex, line 174, in index_object
Module Products.PluginIndexes.DateRangeIndex.DateRangeIndex, line 384, in _removeForwardIndexEntry
KeyError: -633816452
-----------------
DateRangeIndex:384 _removeForwardIndexEntry
351 def _removeForwardIndexEntry( self, since, until, documentId ):
352 """
353 Remove 'documentId' from the appropriate set based on
354 'datum'.
355 """
356 if since is None and until is None:
357
358 self._always.remove( documentId )
359
360 elif since is None:
361
362 set = self._until_only.get( until, None )
363 if set is not None:
364
365 set.remove( documentId )
366
367 if not set:
368 del self._until_only[ until ]
369
370 elif until is None:
371
372 set = self._since_only.get( since, None )
373 if set is not None:
374
375 set.remove( documentId )
376
377 if not set:
378 del self._since_only[ since ]
379
380 else:
381
382 set = self._since.get( since, None )
383 if set is not None:
384 set.remove( documentId )
385
386 if not set:
387 del self._since[ since ]
388
389 set = self._until.get( until, None )
390 if set is not None:
391 set.remove( documentId )
392
393 if not set:
394 del self._until[ until ]
DateRangeIndex:174 index_object
143 def index_object( self, documentId, obj, threshold=None ):
144 """
145 Index an object:
146
147 - 'documentId' is the integer ID of the document
148
149 - 'obj' is the object to be indexed
150
151 - ignore threshold
152 """
153 if self._since_field is None:
154 return 0
155
156 since = getattr( obj, self._since_field, None )
157 if safe_callable( since ):
158 since = since()
159 since = self._convertDateTime( since )
160
161 until = getattr( obj, self._until_field, None )
162 if safe_callable( until ):
163 until = until()
164 until = self._convertDateTime( until )
165
166 datum = ( since, until )
167
168 old_datum = self._unindex.get( documentId, None )
169 if datum == old_datum: # No change? bail out!
170 return 0
171
172 if old_datum is not None:
173 old_since, old_until = old_datum
174 self._removeForwardIndexEntry( old_since, old_until, documentId )
175
176 self._insertForwardIndexEntry( since, until, documentId )
177 self._unindex[ documentId ] = datum
178
179 return 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment