Mailing List Archive

Two or three things about Zope 5
Hi there,

first of all, I want to thanks all the people who works on the project “5”.
Second, please bear with me while I try to communicate my failures with the "5”.
I was able to install zope5.1.2 on my mac and also on opalstack.com with the help of Sean. It looks great! The Chameleon Editor works fine and so almost all the products I would need.
So far, the only issues I have with it are the errors expressions and the Session Data Manager.
1. When in some script I do some typo like “reuest” instead or “request” I get the error “Internal Server Error The server encountered an unexpected internal server error (generated by waitress)”
Question: can I have a better and less “minimalistic” error expressions, something more “friendly”?
2. Yeah! Session Data Manager: "Sessioning is currently disabled because the session data container path setting is invalid. Please enter the path to a valid session data container object.”. What can I do bout it?
3. Sorry, I forgot about this: zone time. In zope 2.xx I used to set the local/zone time in this way: in instance/bin/runzope: export TZ=Europe/Rome. How do I fix it in zope5?

Thanks you all for your work and help,

—giampiero

_______________________________________________
Zope maillist - Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
https://mail.zope.org/mailman/listinfo/zope-announce
https://mail.zope.org/mailman/listinfo/zope-dev )
Re: Two or three things about Zope 5 [ In reply to ]
Hi Giampiero,

generally this mailing list is very low traffic.

When you have questions, the community https://community.plone.org/ is the best way to go.

If you face bugs or you want new features, then the issue trackers at https://github.com/zopefoundation is the right address.

>1. When in some script I do some typo like “reuest” instead or “request” I get the error “Internal Server Error The server encountered an unexpected internal server error
> (generated by waitress)”

Please have a look at the complete traceback (in your log or in your terminal when you start Zope in foreground modus), and determine where the error happens, and then report the error at above mentioned GitHub projects. Maybe you meant https://github.com/zopefoundation/Products.PythonScripts ? I am not sure from your description.

> 2. Yeah! Session Data Manager: "Sessioning is currently disabled because the session data container path setting is invalid. Please enter the path to a valid session data
> container object.”. What can I do bout it?

Exactly what is written ???? You need to set the path to a valid session data container.

I use cookie based session, so I am not very firm with this topic. I remember there was some discussion about temporarystorage and sessions make problems, so the default session mechanism is no longer the default. Maybe you find some more information in the release notes of Zope 4 ( https://github.com/zopefoundation/Zope/blob/4.x/CHANGES.rst )

Oh, here is some good information: https://zope.readthedocs.io/en/latest/zopebook/Sessions.html#alternative-server-side-session-backends-for-zope-4

> 3. Sorry, I forgot about this: zone time. In zope 2.xx I used to set the local/zone time in this way: in instance/bin/runzope: export TZ=Europe/Rome. How do I fix it in zope5?

I use a os.environ['TZ'] = 'Europe/Berlin' in my buildout.cfg and this seems to do the trick.

Best,
Jürgen
Re: Two or three things about Zope 5 [ In reply to ]
Hi Giampiero,

1. Hiding the original exception is done by the waitress WSGI server Zope uses, not Zope itself. Allowing tracebacks to show in the browser leads to an information disclosure vulnerability. You can use the expose_tracebacks argument to waitress by adding it to your WSGI configuration .ini file in the section for the server:

[server:main]
...
expose_tracebacks = True.

Don’t do this for a production site, though. The “minimalistic” error page is there for security reasons.

2. As Jürgen mentioned, https://zope.readthedocs.io/en/latest/zopebook/Sessions.html#alternative-server-side-session-backends-for-zope-4 has more information about using sessions in Zope.

3. Instead of doing a separate EXPORT in your shell when starting Zope you can edit your Zope configuration file and add an environment section like this:

<environment>
TZ Europe/Rome
</environment>

jens



> On 4. May 2021, at 16:24 , Giampiero Benvenuti <giampiero.benvenuti@chiaroscuro.com> wrote:
>
> Hi there,
>
> first of all, I want to thanks all the people who works on the project “5”.
> Second, please bear with me while I try to communicate my failures with the "5”.
> I was able to install zope5.1.2 on my mac and also on opalstack.com with the help of Sean. It looks great! The Chameleon Editor works fine and so almost all the products I would need.
> So far, the only issues I have with it are the errors expressions and the Session Data Manager.
> 1. When in some script I do some typo like “reuest” instead or “request” I get the error “Internal Server Error The server encountered an unexpected internal server error (generated by waitress)”
> Question: can I have a better and less “minimalistic” error expressions, something more “friendly”?
> 2. Yeah! Session Data Manager: "Sessioning is currently disabled because the session data container path setting is invalid. Please enter the path to a valid session data container object.”. What can I do bout it?
> 3. Sorry, I forgot about this: zone time. In zope 2.xx I used to set the local/zone time in this way: in instance/bin/runzope: export TZ=Europe/Rome. How do I fix it in zope5?
>
> Thanks you all for your work and help,
>
> —giampiero
>
> _______________________________________________
> Zope maillist - Zope@zope.org
> https://mail.zope.org/mailman/listinfo/zope
> ** No cross posts or HTML encoding! **
> (Related lists -
> https://mail.zope.org/mailman/listinfo/zope-announce
> https://mail.zope.org/mailman/listinfo/zope-dev )
Re: Two or three things about Zope 5 [ In reply to ]
Thank You Jürgen and Thank You Jens!

ok, with your infos I start to see some light.
The error management makes sense now.

Also, the settings for the timezone are now very clear.
I also realised I can do something like DateTime('Europe/Rome’). It can be useful when you have multiple sites in one Zope instance in different time zones. (is it a good school?)

Ok, some baby steps are done, Now I will get to the session "black magic”.

Oh, one more thing: when I start zope in this way:
/Applications/zope512/bin/runwsgi /Applications/zope512/etc/zope.ini 2>&1 &
without the -v, zope is running disattached from the terminal but I get warnings like:

WARNING [Application:390][MainThread] Duplicate Product name: After loading Product 'BTreeFolder2' from '/apps/zope512/zope/lib64/python3.6/site-packages/Products', I skipped the one in '/apps/zope512/zope/lib/python3.6/site-packages/Products’.
The same Warning for all the Products I installed with pip: bin/pip install…

From the terminal I also get all the errors printouts (even if Zope is disattached).

Thanks again guys,

—giampiero

> On 6 May 2021, at 17:51 45, Jens Vagelpohl <jens@netz.ooo> wrote:
>
> Hi Giampiero,
>
> 1. Hiding the original exception is done by the waitress WSGI server Zope uses, not Zope itself. Allowing tracebacks to show in the browser leads to an information disclosure vulnerability. You can use the expose_tracebacks argument to waitress by adding it to your WSGI configuration .ini file in the section for the server:
>
> [server:main]
> ...
> expose_tracebacks = True.
>
> Don’t do this for a production site, though. The “minimalistic” error page is there for security reasons.
>
> 2. As Jürgen mentioned, https://zope.readthedocs.io/en/latest/zopebook/Sessions.html#alternative-server-side-session-backends-for-zope-4 has more information about using sessions in Zope.
>
> 3. Instead of doing a separate EXPORT in your shell when starting Zope you can edit your Zope configuration file and add an environment section like this:
>
> <environment>
> TZ Europe/Rome
> </environment>
>
> jens
>
>
>
>> On 4. May 2021, at 16:24 , Giampiero Benvenuti <giampiero.benvenuti@chiaroscuro.com> wrote:
>>
>> Hi there,
>>
>> first of all, I want to thanks all the people who works on the project “5”.
>> Second, please bear with me while I try to communicate my failures with the "5”.
>> I was able to install zope5.1.2 on my mac and also on opalstack.com with the help of Sean. It looks great! The Chameleon Editor works fine and so almost all the products I would need.
>> So far, the only issues I have with it are the errors expressions and the Session Data Manager.
>> 1. When in some script I do some typo like “reuest” instead or “request” I get the error “Internal Server Error The server encountered an unexpected internal server error (generated by waitress)”
>> Question: can I have a better and less “minimalistic” error expressions, something more “friendly”?
>> 2. Yeah! Session Data Manager: "Sessioning is currently disabled because the session data container path setting is invalid. Please enter the path to a valid session data container object.”. What can I do bout it?
>> 3. Sorry, I forgot about this: zone time. In zope 2.xx I used to set the local/zone time in this way: in instance/bin/runzope: export TZ=Europe/Rome. How do I fix it in zope5?
>>
>> Thanks you all for your work and help,
>>
>> —giampiero
>>
>> _______________________________________________
>> Zope maillist - Zope@zope.org
>> https://mail.zope.org/mailman/listinfo/zope
>> ** No cross posts or HTML encoding! **
>> (Related lists -
>> https://mail.zope.org/mailman/listinfo/zope-announce
>> https://mail.zope.org/mailman/listinfo/zope-dev )
>
>
> _______________________________________________
> Zope maillist - Zope@zope.org
> https://mail.zope.org/mailman/listinfo/zope
> ** No cross posts or HTML encoding! **
> (Related lists -
> https://mail.zope.org/mailman/listinfo/zope-announce
> https://mail.zope.org/mailman/listinfo/zope-dev )


_______________________________________________
Zope maillist - Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
https://mail.zope.org/mailman/listinfo/zope-announce
https://mail.zope.org/mailman/listinfo/zope-dev )
Re: Two or three things about Zope 5 [ In reply to ]
Hi Giampiero,

The warning messages are due to virtualenv creating a folder “lib” and a link “lib64” that links to “lib”. Both these library paths are put onto sys.path, so to Zope it looks like there are two distinct locations containing the same Zope products.

Installing Zope products into a virtual environment with pip isn’t very common. Most users and most developers/maintainers use zc.buildout to create Zope instances with buildout recipe plone.recipe.zope2instance. See https://zope.readthedocs.io/en/latest/INSTALL.html#installing-zope-with-zc-buildout

jens


> On 7. May 2021, at 11:15 , Giampiero Benvenuti <giampiero.benvenuti@chiaroscuro.com> wrote:
>
> Thank You Jürgen and Thank You Jens!
>
> ok, with your infos I start to see some light.
> The error management makes sense now.
>
> Also, the settings for the timezone are now very clear.
> I also realised I can do something like DateTime('Europe/Rome’). It can be useful when you have multiple sites in one Zope instance in different time zones. (is it a good school?)
>
> Ok, some baby steps are done, Now I will get to the session "black magic”.
>
> Oh, one more thing: when I start zope in this way:
> /Applications/zope512/bin/runwsgi /Applications/zope512/etc/zope.ini 2>&1 &
> without the -v, zope is running disattached from the terminal but I get warnings like:
>
> WARNING [Application:390][MainThread] Duplicate Product name: After loading Product 'BTreeFolder2' from '/apps/zope512/zope/lib64/python3.6/site-packages/Products', I skipped the one in '/apps/zope512/zope/lib/python3.6/site-packages/Products’.
> The same Warning for all the Products I installed with pip: bin/pip install…
>
> From the terminal I also get all the errors printouts (even if Zope is disattached).
>
> Thanks again guys,
>
> —giampiero
>
>> On 6 May 2021, at 17:51 45, Jens Vagelpohl <jens@netz.ooo> wrote:
>>
>> Hi Giampiero,
>>
>> 1. Hiding the original exception is done by the waitress WSGI server Zope uses, not Zope itself. Allowing tracebacks to show in the browser leads to an information disclosure vulnerability. You can use the expose_tracebacks argument to waitress by adding it to your WSGI configuration .ini file in the section for the server:
>>
>> [server:main]
>> ...
>> expose_tracebacks = True.
>>
>> Don’t do this for a production site, though. The “minimalistic” error page is there for security reasons.
>>
>> 2. As Jürgen mentioned, https://zope.readthedocs.io/en/latest/zopebook/Sessions.html#alternative-server-side-session-backends-for-zope-4 has more information about using sessions in Zope.
>>
>> 3. Instead of doing a separate EXPORT in your shell when starting Zope you can edit your Zope configuration file and add an environment section like this:
>>
>> <environment>
>> TZ Europe/Rome
>> </environment>
>>
>> jens
>>
>>
>>
>>> On 4. May 2021, at 16:24 , Giampiero Benvenuti <giampiero.benvenuti@chiaroscuro.com> wrote:
>>>
>>> Hi there,
>>>
>>> first of all, I want to thanks all the people who works on the project “5”.
>>> Second, please bear with me while I try to communicate my failures with the "5”.
>>> I was able to install zope5.1.2 on my mac and also on opalstack.com with the help of Sean. It looks great! The Chameleon Editor works fine and so almost all the products I would need.
>>> So far, the only issues I have with it are the errors expressions and the Session Data Manager.
>>> 1. When in some script I do some typo like “reuest” instead or “request” I get the error “Internal Server Error The server encountered an unexpected internal server error (generated by waitress)”
>>> Question: can I have a better and less “minimalistic” error expressions, something more “friendly”?
>>> 2. Yeah! Session Data Manager: "Sessioning is currently disabled because the session data container path setting is invalid. Please enter the path to a valid session data container object.”. What can I do bout it?
>>> 3. Sorry, I forgot about this: zone time. In zope 2.xx I used to set the local/zone time in this way: in instance/bin/runzope: export TZ=Europe/Rome. How do I fix it in zope5?
>>>
>>> Thanks you all for your work and help,
>>>
>>> —giampiero
>>>
>>> _______________________________________________
>>> Zope maillist - Zope@zope.org
>>> https://mail.zope.org/mailman/listinfo/zope
>>> ** No cross posts or HTML encoding! **
>>> (Related lists -
>>> https://mail.zope.org/mailman/listinfo/zope-announce
>>> https://mail.zope.org/mailman/listinfo/zope-dev )
>>
>>
>> _______________________________________________
>> Zope maillist - Zope@zope.org
>> https://mail.zope.org/mailman/listinfo/zope
>> ** No cross posts or HTML encoding! **
>> (Related lists -
>> https://mail.zope.org/mailman/listinfo/zope-announce
>> https://mail.zope.org/mailman/listinfo/zope-dev )
>