You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the following error should not happen.
(Plone 5.0.2, plone.app.event 2.0.3)
bin/instance run scripts/new-site.py omicron
Traceback (most recent call last):
File "/home/ajung/sandboxes/omicron_buildout/parts/instance/bin/interpreter", line 280, in <module>
exec(_val)
File "<string>", line 1, in <module>
File "scripts/new-site.py", line 100, in <module>
obj.reindexObject()
File "/home/ajung/.buildout/eggs/Products.CMFCore-2.2.10-py2.7.egg/Products/CMFCore/CMFCatalogAware.py", line 88, in reindexObject
catalog.reindexObject(self, idxs=idxs)
File "/home/ajung/.buildout/eggs/Products.CMFCore-2.2.10-py2.7.egg/Products/CMFCore/CatalogTool.py", line 301, in reindexObject
self.catalog_object(object, uid, idxs, update_metadata)
File "/home/ajung/.buildout/eggs/Products.CMFPlone-5.0-py2.7.egg/Products/CMFPlone/CatalogTool.py", line 345, in catalog_object
update_metadata, pghandler=pghandler)
File "/home/ajung/.buildout/eggs/Products.ZCatalog-3.0.2-py2.7.egg/Products/ZCatalog/ZCatalog.py", line 476, in catalog_object
update_metadata=update_metadata)
File "/home/ajung/.buildout/eggs/Products.ZCatalog-3.0.2-py2.7.egg/Products/ZCatalog/Catalog.py", line 347, in catalogObject
self.updateMetadata(object, uid, index)
File "/home/ajung/.buildout/eggs/Products.ZCatalog-3.0.2-py2.7.egg/Products/ZCatalog/Catalog.py", line 311, in updateMetadata
if data.get(index, 0) != newDataRecord:
TypeError: can't compare offset-naive and offset-aware datetimes
make: *** [new-site] Error 1
for i in range(10):
id = 'event-{}'.format(i+1)
start = datetime.now().replace(hour=9, minute=0, second=0)
end = start + timedelta(days=2)
end = end.replace(hour=17)
path = '{}/de/kurse-termine/{}'.format(site_id, id)
obj = plone.api.content.create(type='Event', container=root['kurse-termine'], id=id)
obj.setTitle(gen_sentence())
obj.setDescription(gen_paragraphs(1))
text = gen_sentences()
obj.text = RichTextValue(text, 'text/html', 'text/html')
obj.contact_name = u'Heinz Becker'
obj.contact_email = u'[email protected]'
obj.contact_phone = '+49 1234 1212121'
obj.event_url = u'https://www.plone.org'
plone.api.content.transition(obj, 'publish')
event = IEventBasic(obj)
event.start = start
event.end = end
event.timezone = 'CT'
obj.reindexObject()
The text was updated successfully, but these errors were encountered:
According to
https://ploneappevent.readthedocs.org/en/latest/development.html#getting-and-setting-properties
the following error should not happen.
(Plone 5.0.2, plone.app.event 2.0.3)
The text was updated successfully, but these errors were encountered: