Closed PatrickDowney closed 1 year ago
Any updates for this issue? python 3.8.12 + Plone5.2.8
Also seeing this on a fresh Plone using buildout.coredev
Steps to reproduce:
Get:
Traceback (innermost last):
Module ZPublisher.WSGIPublisher, line 181, in transaction_pubevents
Module ZPublisher.WSGIPublisher, line 390, in publish_module
Module ZPublisher.WSGIPublisher, line 285, in publish
Module ZPublisher.mapply, line 85, in mapply
Module ZPublisher.WSGIPublisher, line 68, in call_object
Module Shared.DC.Scripts.Bindings, line 333, in __call__
Module Shared.DC.Scripts.Bindings, line 370, in _bindAndExec
Module App.special_dtml, line 222, in _exec
Module DocumentTemplate._DocumentTemplate, line 144, in render_blocks
Module DocumentTemplate._DocumentTemplate, line 245, in render_blocks_
Module DocumentTemplate.DT_Let, line 85, in render
Module DocumentTemplate._DocumentTemplate, line 144, in render_blocks
Module DocumentTemplate._DocumentTemplate, line 245, in render_blocks_
Module DocumentTemplate.DT_In, line 648, in renderwb
Module DocumentTemplate._DocumentTemplate, line 144, in render_blocks
Module DocumentTemplate._DocumentTemplate, line 227, in render_blocks_
Module DocumentTemplate._DocumentTemplate, line 168, in render_blocks_
Module DocumentTemplate.DT_Util, line 215, in eval
- __traceback_info__: _
Module <string>, line 1, in <module>
Module DateTime.DateTime, line 451, in __init__
SyntaxError: Unable to parse (2023.1849107676226, 3.186671146951994, 6.786805555573665, 18.883333332836628, 53, 0, 'UTC'), {}
Versions:
Plone 6.0.3.dev0 (6014)
CMF 2.7.0
Zope 5.8
Python 3.10.6 (main, Nov 14 2022, 16:10:14) [GCC 11.3.0]
PIL 9.4.0 (Pillow)
WSGI: On
Server: waitress 2.1.2
Also seeing it with Python 3.8.10
Not sure what's up here, but it looks strange that the year/month/day are floats rather than ints.
Yup, haven't been able to figure out where is that coming from...
@frapell It's from here: https://github.com/zopefoundation/Products.ZCatalog/blob/master/src/Products/PluginIndexes/dtml/browseIndex.dtml#L34-L39
Probably needs to be updated to use Python 3's floor division (//
)
@davisagli Indeed, that was it... replacing all of those with //
does fix it
I close this here, upstream bug in ZCatalog.
@frapell FYI, fixed and released in ZCatalog 7.0: https://github.com/zopefoundation/Products.ZCatalog/pull/145
Thanks for responses and fixing this. Really appreciate it.
I have a Plone 5.2 site and through ZMI, I'm trying to view records of an index I had that was a DateIndex. However, it was giving me an error that it couldn't parse the date. I tried viewing other DateIndexes and was getting the same error. I tried to make a new Plone Site without installing anything to see if there was an issue with one of the packages, but I was getting the same error.
What I did:
In my buildout.cfg, I removed my packages I placed in the src directory from 'eggs' and 'develop'. I deleted the existing data.fs files and then reran buildout. I then started the instance and created a new Plone site. Without installing anything or touching anything else, I went into 'portal_catalog' in the ZMI, clicked on 'Indexes', clicked on 'created' (an index whose type is 'DateIndex') and then clicked on Browse.
What I expect to happen:
A list of records of the 'created' DateIndex.
What actually happened:
I received a traceback that looks like it was trying to parse something but failed.
Edit: I think its the version of python I'm using. I started a new buildout just using 2.7 and it worked. When I pointed the unified installer to the default python 3 that came with the os (Xubuntu 18.04.3), I got the same error again.
What version of Plone/ Addons I am using:
Edit: Plone 5.2.1
python 3.6.9 OS being used: Xubuntu 18.04.3