How to set email configuration? --> Error

Dear community,
I tried setting the email preferences and got this info banner:

Upon clicking on “Mail” I go this error:

Is this supposed to happen?
If I did it wrong, what is the recommended way to set emial configuration?
I even tried setting it through ZMI after I got this error, but still without luck. I cannot make an entry for the “From” address there.

I want to be able to receive emails from senaite when devices are due for calibration. Is this possible?
Please enlighten me.

Thanks,
Andreas

hi @der.einstein,
I followed the steps on the following page and it worked:
https://docs.plone.org/4/en/adapt-and-extend/config/mail.html?highlight=email
Try it, hope it works for you too.

Regards,
Himanshu.

Thx for your input @hsgkp, but the problem is, that I cannot access the page where I can entry my email details. It just leeves me with the error message above.

However, meanwhile I tried firing up the official Plone 5.x and 4.3 docker images.
In both cases everything seems to work there.
So I wonder what makes the difference there, as almost all is the same regarding Plone installation.

Is anybody else using the docker images?

Thanks,
Andreas

This is a bug introduced recently that can only be reproduced in fresh-installations of v1.3.2. Has been fixed already: #1469 Fix Site Properties Generic Setup Export Step.

Please, update to latest source code and run the upgrade step 1.3.3 for senaite.core:

1.- Update to latest source code of senaite.core
2.- Login as admin user
3.- Go to “Site setup > Add-ons”
4.- In the “List of activated add-ons”, locate “Senaite Core 1.3.2” and press the button to upgrade your instance.

Thanks for this tip. I searched through this community site as well as github but could not find anything related to the email settings.
However, I struggled already with your first point:

I tried using “mr.developer” inside my docker container according to point “Installing development version of add-on packages” on https://docs.plone.org/manage/installing/installing_addons.html. However, it didn’t work. I modified the top rows of my buildout and ran “python bootstrap.py” again. The lines are as follows:

[buildout]
extends =
buildout-base.cfg

extensions = mr.developer

auto-checkout = senaite.core

index = Simple index

var-dir=/data
user=admin:admin

effective-user = senaite
buildout-user = senaite

eggs-directory=…/buildout-cache/eggs
download-cache=…/buildout-cache/downloads

parts +=
zeo

eggs +=
senaite.lims
senaite.storage

[client1]

On the tail I added:

[sources]
senaite.core = git GitHub - senaite/senaite.core: Enterprise Open Source Laboratory System (LIMS)

It failed directly with this error message:

root@185b24f1b101:/home/senaite/senaitelims# python bootstrap.py
ez_setup.py is deprecated and when using it setuptools will be pinned to 33.1.1 since it’s the last version that supports setuptools self upgrade/installation, check Drop support for self upgrade/installation · Issue #581 · pypa/setuptools · GitHub for more info; use pip to install setuptools
Downloading https://pypi.io/packages/source/s/setuptools/setuptools-33.1.1.zip
Extracting in /tmp/tmpzO27m_
Now working in /tmp/tmpzO27m_/setuptools-33.1.1
Building a Setuptools egg in /tmp/bootstrap-hDjouB
warning: no files found matching ‘*’ under directory ‘setuptools/_vendor’
/tmp/bootstrap-hDjouB/setuptools-33.1.1-py2.7.egg
no previously-included directories found matching ‘doc’
no previously-included directories found matching ‘old-tutorial’
Creating directory ‘/home/senaite/senaitelims/develop-eggs’.

What is the intended way to exchange a released package version with the current source from github?
What did I miss?
Is there another information source how to add github source packages to an already up and running instance?

Thank you very much!

Ok. I just tried the next step in the Dockerfile and ran “bin/buildout”. This is the output:

root@185b24f1b101:/home/senaite/senaitelims# bin/buildout
mr.developer: Queued ‘senaite.core’ for checkout.
mr.developer: Cloned ‘senaite.core’ with git from ‘GitHub - senaite/senaite.core: Enterprise Open Source Laboratory System (LIMS)’.
Develop: ‘/home/senaite/senaitelims/src/senaite.core’
warning: no previously-included files matching ‘’ found under directory ‘docs’
warning: no previously-included files matching '
.pyc’ found under directory ‘bika’
Uninstalling releaser.
Uninstalling checkdocs.
Uninstalling mrbob.
Uninstalling diazotools.
Uninstalling test.
Uninstalling precompiler.
Uninstalling zopepy.
Uninstalling instance.
Updating _mr.developer.
Installing instance.
Generated script ‘/home/senaite/senaitelims/bin/instance’.
Generated interpreter ‘/home/senaite/senaitelims/parts/instance/bin/interpreter’.
Updating zeoserver.
Updating repozo.
Updating backup.
Installing zopepy.
Generated interpreter ‘/home/senaite/senaitelims/bin/zopepy’.
Updating unifiedinstaller.
Installing precompiler.
Compiling Python files.
Compiling locale files.
Updating setpermissions.
setpermissions: Running # Dummy references to force this to execute after referenced parts
echo /data/backups yes > /dev/null
chmod 600 .installed.cfg

Make sure anything we’ve created in var is r/w by our group

find /data -type d -exec chmod 770 {} ; 2> /dev/null
find /data -type f -exec chmod 660 {} ; 2> /dev/null

but not the egg cache

chmod -R g-w /home/senaite/senaitelims/var/.python-eggs
find /data -type d -exec chmod 770 {} ; 2> /dev/null
find /data -type f -exec chmod 660 {} ; 2> /dev/null
chmod 754 /home/senaite/senaitelims/bin/*
chmod: cannot access ‘/home/senaite/senaitelims/var/.python-eggs’: No such file or directory
Updating zeo.
Versions had to be automatically picked.
The following part definition lists the versions picked:
[versions]
senaite.storage = 1.0.0

From what is the output, this would suggest a “success”. However, in senaite it looks like this in the list of activated addons:

I cannot do anything there to upgrade to a newer version.

What has gone wrong?
Can you suggest something?

Thank you so much!

Hi @der.einstein I think that the easiest way to use the latest code in GitHub is using the development environment.

You have to at least add "senaite.core " under the eggs section but I suggest that you also add all other packages: senaite.core.listing, senaite.impress, etc

Now, you "git clone " in the “src/” folder.

Then, you have to define the “develop” section that points where to find the source code. Note that the code have to be in a local directory in your computer or server.

# Provide the *paths* to the eggs you are developing here:
develop =
#    src/my.package
   src/senaite.lims
   src/senaite.core
   src/senaite.core.listing
   src/senaite.core.supermodel
   src/senaite.impress
   src/senaite.api

If you are considering to use Senaite in a productive environment, I suggest that you hire professional services for guidance, help and training. It is the easiest way to deploy and customize Senaite having professional backup to face any inconvenience.

Thanks for your support. I really appreciate this.

I was successful with the following approach:

  1. from my server I ran

git clone GitHub - senaite/senaite.docker: SENAITE Docker Container
cd senaite.docker
cp -R 1.3.2 1.3.3
cd 1.3.3
mkdir src
cd src

Then I git cloned all senaite packages into the “src” folder.
Back in the “1.3.3” folder I modified the “Dockerfile” to read:

# Use an official Python runtime as a parent image
FROM python:2.7-stretch

# Set one or more individual labels
LABEL senaite.core.version="1.3.3-git"

# Set environment variables
ENV PLONE_MAJOR=4.3 \
    PLONE_VERSION=4.3.19 \
    PLONE_MD5=04ed5beac7fb8504f06a36d44e407b06 \
    SENAITE_HOME=/home/senaite \
    SENAITE_USER=senaite \
    SENAITE_INSTANCE_HOME=/home/senaite/senaitelims \
    SENAITE_DATA=/data \
    SENAITE_FILESTORAGE=/data/filestorage \
    SENAITE_BLOBSTORAGE=/data/blobstorage \
    ADDONS='senaite.lims senaite.core senaite.core.supermodel senaite.core.listing senaite.impress senaite.storage' \
    DEVELOP='src/senaite.lims src/senaite.core src/senaite.core.supermodel src/senaite.core.listing src/senaite.impress src/senaite.storage'

# Create the senaite user
RUN useradd --system -m -d $SENAITE_HOME -U -u 500 $SENAITE_USER

# Create direcotries
RUN mkdir -p $SENAITE_INSTANCE_HOME $SENAITE_FILESTORAGE $SENAITE_BLOBSTORAGE

RUN echo "deb http://deb.debian.org/debian stretch-backports main contrib non-free" >> /etc/apt/sources.list

# Copy the package config
COPY packages.txt /

# Install package dependencies
RUN apt-get update && apt-get install -y --no-install-recommends $(grep -vE "^\s*#" /packages.txt  | tr "\n" " ") && apt-get -t stretch-backports install -y --no-install-recommends python-lxml && pip install lxml

# Fetch unified installer
RUN wget -O Plone.tgz https://launchpad.net/plone/$PLONE_MAJOR/$PLONE_VERSION/+download/Plone-$PLONE_VERSION-UnifiedInstaller.tgz \
    && echo "$PLONE_MD5 Plone.tgz" | md5sum -c - \
    && tar -xzf Plone.tgz \
    && cp -rv /Plone-$PLONE_VERSION-UnifiedInstaller/base_skeleton/* $SENAITE_INSTANCE_HOME \
    && cp -v /Plone-$PLONE_VERSION-UnifiedInstaller/buildout_templates/buildout.cfg $SENAITE_INSTANCE_HOME/buildout-base.cfg \
    && cd $SENAITE_HOME \
    && tar -xjf /Plone-$PLONE_VERSION-UnifiedInstaller/packages/buildout-cache.tar.bz2 \
    && rm -rf /Plone-$PLONE_VERSION-UnifiedInstaller /Plone.tgz

# Change working directory
WORKDIR $SENAITE_INSTANCE_HOME

# Copy Buildout
COPY bootstrap.py buildout.cfg ./

COPY src ./src

# Bootstrap and buildout
RUN python bootstrap.py \
    && bin/buildout \
    && ln -s $SENAITE_FILESTORAGE/ var/filestorage \
    && ln -s $SENAITE_BLOBSTORAGE/ var/blobstorage \
    && chown -R senaite:senaite $SENAITE_HOME $SENAITE_DATA \
    && rm -rf $SENAITE_HOME/buildout-cache/downloads/dist

# Mount external volume
VOLUME /data

# Copy startup scripts
COPY docker-initialize.py docker-entrypoint.sh /

# Expose instance port
EXPOSE 8080

# Add instance healthcheck
HEALTHCHECK --interval=1m --timeout=5s --start-period=1m \
  CMD nc -z -w5 127.0.0.1 8080 || exit 1

ENTRYPOINT ["/docker-entrypoint.sh"]
CMD ["start"]

The “docker-compose” file was modified to read:

version: "2"
services:
  senaite:
    image: senaite-1.3.3-git:arm64
    volumes:
    - data:/data
    - $PWD/src:/home/senaite/senaitelims/src
    ports:
    - "8080:8080"
    environment:
            #- ADDONS=senaite.kanban
            - DEVELOP=src/senaite.core src/senaite.storage src/senaite.core.listing src/senaite.core.supermodel src/senaite.impress src/senaite.lims
            - ADDONS=senaite.core senaite.storage senaite.core.listing senaite.core.supermodel senaite.impress senaite.lims
            - VERSIONS=senaite.core=1.3.3 senaite.lims=1.3.2.1

volumes:
  data:

In “buildout.cfg” I uncommented the lines which defined distinct versions for the senaite packages.

Now I built the docker image with

docker build -t senaite-1.3.3-git:arm64 .

I started the container with

docker-compose up

Now I have the current Seanite packages listed under “Addons” in the Plone configuration panel.
The email configuration works now!

Hope that this may help someone else!

BTW: You may have recognized that the platform “arm64”. I had to modify the “Dockerfile” to let it build on arm64.

Cheers.
`

1 Like

Thanks for sharing this. Please share step-by-step terminal commands for your instructions. I am new to docker and unable to navigate properly to find the different files mentioned.
Thanks.

At which step do you struggle?

The steps on my last post just miss out the following:
cd src && git clone https://github.com/senaite/senaite.core
… analogous all other senaite packages …
cd … & vi buildout.cfg
… to comment out the senaite packages lines under “[versions]”

Hope that helps!

Thanks for getting back. @der.einstein

I now have several buildout.cfg files. Which one is being edited? 1.3.3 or the ones in the src folder?

Not sure where in the folder structure I should run this command from. Also, when I run it, I get the error message that “docker build requires exactly 1 argument”

To answer your questions:

  • edit the new, copied buildout.cfg in the senaite-1.3.3-git folder

  • the docker documentation (https://docs.docker.com/engine/reference/commandline/build/) states this should work, as it did for me:

    Tag an image (-t)

    $ docker build -t vieux/apache:2.0 .
    

    This will build like the previous example, but it will then tag the resulting image. The repository name will be vieux/apache and the tag will be 2.0 . Read more about valid tags.

  • run the docker build command from the folder where your “Dockerfile” resides

See if that helps :innocent:

Hi @xispa

I have updated my instance and still can not get to the email setup page. I get the below trace:

We’re sorry, but there seems to be an error…

Here is the full error message:

Display traceback as text

Traceback (innermost last):

  • Module ZPublisher.Publish, line 138, in publish
  • Module ZPublisher.mapply, line 77, in mapply
  • Module ZPublisher.Publish, line 48, in call_object
  • Module zope.formlib.form, line 868, in call
  • Module five.formlib.formbase, line 50, in update
  • Module zope.formlib.form, line 831, in update
  • Module plone.fieldsets.form, line 30, in setUpWidgets
  • Module zope.formlib.form, line 417, in setUpEditWidgets
  • Module zope.schema._bootstrapfields, line 215, in get
  • Module plone.app.controlpanel.mail, line 138, in get_email_from_name

AttributeError: email_from_name

Find below-installed versions: (installed from sources)

Hi @ronaldm you need to update the sources to latest and run the upgrade step 1.3.3

Hi I have this email problem too with the trace text displayed. My senaite is installed on a ubuntu server, what are the terminal commands or steps to type in to get senaite to update to 1.3.3 to solve the email problem?

Thank you

There is no visible update button. The only options available are to activate or deactivate an addon.

Hello Pau,

Thank you very much for your advice on setting up senaite on docker. However, I have followed your advice but each time I launch the docker-compose up -d command, everything in the src folder gets deleted, as such, my changes are lost.
Am I missing something? You can find the contents of my buildout file below

[buildout]
extends =
  buildout-base.cfg

extensions =

index = https://pypi.python.org/simple/

var-dir=/data
user=admin:admin

effective-user = senaite
buildout-user = senaite

eggs-directory=../buildout-cache/eggs
download-cache=../buildout-cache/downloads

parts +=
  zeo

eggs +=
    Plone
    Pillow
    senaite.lims
	senaite.health
	senaite.core.listing
	senaite.core.supermodel
	senaite.impress
	senaite.api
	
develop =
    src/senaite.lims
	src/senaite.health
	src/senaite.core
    src/senaite.core.listing
    src/senaite.core.supermodel
    src/senaite.impress
    src/senaite.api

[client1]
recipe =

[zeo]
<= zeoserver_base
recipe = plone.recipe.zeoserver
zeo-address = 8080

[versions]
setuptools=
zc.buildout=
senaite.lims=1.3.3.1
senaite.core=1.3.3
soupsieve = 1.9.4

# The following part definition lists the versions picked:
Chameleon = 3.6.2
Products.ATExtensions = 1.1
Pyphen = 0.9.5
Werkzeug = 1.0.0
backports.functools-lru-cache = 1.6.1
cairocffi = 0.9.0
cffi = 1.14.0
cssselect2 = 0.2.2
html5lib = 1.0.1
more-itertools = 5.0.0
pdfrw = 0.4
plone.recipe.command = 1.1
plone.recipe.precompiler = 0.6
senaite.core.supermodel = 1.2.3
sourcecodegen = 0.6.14
tinycss2 = 0.6.1
webencodings = 0.5.1
z3c.pt = 3.2.0

# Required by:
# senaite.core==1.3.3
Products.DataGridField = 1.9.6

# Required by:
# senaite.core==1.3.3
Products.TextIndexNG3 = 3.4.14

# Required by:
# senaite.impress==1.2.3
beautifulsoup4 = 4.8.2

# Required by:
# senaite.core==1.3.3
collective.indexing = 2.1

# Required by:
# senaite.core==1.3.3
collective.progressbar = 0.5

# Required by:
# plone.jsonapi.core==0.6
dicttoxml = 1.7.4

# Required by:
# senaite.core==1.3.3
jarn.jsi18n = 1.1

# Required by:
# senaite.core==1.3.3
magnitude = 0.9.4

# Required by:
# senaite.core==1.3.3
plone.jsonapi.core = 0.6

# Required by:
# cffi==1.14.0
pycparser = 2.19

# Required by:
# senaite.core==1.3.3
z3c.jbot = 0.8

# Required by:
# plone.recipe.unifiedinstaller==4.3.2
# plone.recipe.zeoserver==1.3.1
# plone.recipe.zope2instance==4.4.1
# z3c.autoinclude==0.3.9
zc.buildout = 2.13.3

# Required by:
# Products.TextIndexNG3==3.4.14
zopyx.txng3.core = 3.6.2

I think this question is out of topic. Can you kindly create a new issue specific for your concern?

Regards,