Closed gpzope closed 3 years ago
gpzope wrote at 2021-6-8 04:57 -0700:
What I did:
Try to add a ConfiguresPASS on new Zope5.2.1 instance on MacOS 10.13.6 Python 3.7.7 via ZMI, it generates the following error: ERROR [Zope.SiteErrorLog:252][waitress-2] 1623152909.9372760.5106680831995953 http://localhost:8080/testFolder/manage_addProduct/PluggableAuthService/addConfiguredPAS Traceback (innermost last): ... Module Products.PluggableAuthService.exportimport, line 29, in importPAS Module Products.GenericSetup.content, line 159, in import_ TypeError: initial_value must be str or None, not bytes
This is almost surely a Python 3 incompatibility -- likely
resolved in other packages supporting GenericSetup
.
As Dieter points out, the issue is not in this package but in Products.GenericSetup
. It attempts to read import data from the file system and does so in explicit binary mode. Then it wants to put the extracted binary string into an instance of six.moves.cStringIO
, which is io.StringIO
under Python 3 and thus unable to use binary data. This issue must have existed for a long time.
Jens Vagelpohl wrote at 2021-6-8 07:46 -0700:
As Dieter points out, the issue is not in this package but in
Products.GenericSetup
. It attempts to read import data from the file system and does so in explicit binary mode. Then it wants to put the extracted binary string into an instance ofsix.moves.cStringIO
, which isio.StringIO
under Python 3 and thus unable to use binary data. This issue must have existed for a long time.
Products.GenericSetup
is actively used by Plone
.
Potentially, a new version will solve the problem.
The fix will be tracked in https://github.com/zopefoundation/Products.GenericSetup/issues/107, this is essentially a duplicate.
What I did:
Try to add a ConfiguresPASS on new Zope5.2.1 instance on MacOS 10.13.6 Python 3.7.7 via ZMI, it generates the following error: