Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Paul VanderWeele
Only occurs for v5.2.3 and newer of the Unified Installer too.

Hello everyone,
May you please help me with the error - UnicodeDecodeError
I am getting the UnicodeDecodeError on senaite lims and could a plone or python locale error but the error occured during senaite lims import.

Im importing Client Contacts using a spreadsheet.
and adds the Client contact arné and creates a user.
The import works locally(on my laptop)


but does not work on the test server and I was wondering what is being done differently.
but using the same code on production/test server it throws the following error

Error adding user (The login name you selected is already in use or is not valid. Please choose another.): arné
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 8: ordinal not in range(128)

A collegue said sometimes it can be fixed by setting LC_ALL shell variable to eg. en_us.UTF8 but this was already the case on server

and the locale on the laptop is en_ZA.UTF8 and so we started adding/chainging the supervisor client to

command=/path-to/zeocluster/bin/client2 console
environment=LANG="en_ZA.utf8", LC_ALL="en_ZA.UTF-8", LC_LANG="en_ZA.UTF-8"

and put same on all clients on the supervisor including the zeoserver
environment=LANG="en_ZA.utf8", LC_ALL="en_ZA.UTF-8", LC_LANG="en_ZA.UTF-8"

but still get the same error, any idea what could be the cause.
Thank you.

Joseph Sefara
May someone please create a complete add-on example for custom senaite-impress reports. Whereby I am able to use the python code to add more functions that I can use on the template (e.g view/myfunction). I am ware of the example given here but is not enough.

May someone please create a complete add-on example for custom senaite-impress reports. Whereby I am able to use the python code to add more functions that I can use on the template (e.g view/myfunction). I am ware of the example given here but is not enough.

you can use mr bob to create plone add-on and also have a look at this custom template as an example for custom reports

Albion Shala
Hi all,
I have been trying to add the Dynamic Analysis Specifications into my Senaite since I want to achieve the same feature to make analysis dynamic based on sex and age apart from min and max.
Albion Shala
What I tried so far was creating a new python scrip with this (see below) content taken from the link above in the .../bika/lims/adapters
from bika.lims.interfaces import IDynamicResultsRange
from bika.lims.interfaces.analysis import IRequestAnalysis
from zope.interface import implementer

class DynamicResultsRange(object):

    def __init__(self, analysis):
        self.analysis = analysis

    def __call__(self):
        if not IRequestAnalysis.providedBy(self.analysis):
            # Cannot grab the patient from analyses not assigned to a Sample
            return {}

        # Get the sample's specificaion
        sample = self.analysis.getRequest()
        specification = sample.getSpecification()
        if not specification:
            # No specification, nothing to do
            return {}

        # Dynamic specification
        dyn_spec = specification.getDynamicAnalysisSpec()

        # Get the patient from the sample
        sample = self.analysis.getRequest()
        patient = sample.getField("Patient").get(sample)
        if not patient:
            # No patient assigned for this sample, do nothing
            return {}

        # Patient's age (in years)
        age = patient.getAge()
        # Patient's gender (male/female/dk)
        sex = patient.getGender()

        # Get the dynamic specification for this analysis by keyword
        # We expect the xls to have the columns "keyword", "age" and "sex"
        keyword = self.analysis.getKeyword()
        ranges = dyn_spec.get_by_keyword().get(keyword)
        if not ranges:
            # No ranges defined for this analysis
            return {}

        # Find a match by age and sex
        for range in ranges:
            if range.get("age") == age and range.get("sex") == sex:
                return range

        # No dynamic specification found for this analysis and patient
        return {}

Then I modified the configure.zcml on the same directory with:



  <class class="bika.lims.content.analysis.Analysis">
    <implements interface="my.lims.interfaces.IRoutineAnalysis" />


Then I run the command: gosu senaite /home/senaite/senaitelims/bin/buildout -c custom.cfg.

So far the change isn't happening, therefore can someone tell me if this is the right approach or there should be done something else to enable this feature?

Paul VanderWeele
@Lunga001 What Import are you using? If you're using a custom script, make sure python isn't auto-magically changing the character.
>>> "arné" == u"arné"

Only occurs for v5.2.3 and newer of the Unified Installer too.

Also for anyone curious, I solved the certificate issue when running Buildout. The symbolic links of certificates inside the Senaite environment's copy of Python2.7 certifi were broken, and therefore could not find the system cache of certificates from the Ubuntu 20.04 ca-certificates

Paul VanderWeele

To fix, I had to:

1) Ensure ca-certificates has an up-to-date cache of Certificates
2) Manually re-create the symbolic links inside Plone's copy of certifi.

Hello, I have a question. For example, can I import 100 sample information at a time? At present, adding multiple samples in this batch is manually entered. Does it have recognition function
Albion Shala
Any help or redirection towards a previous documentation/issue/discussion would be appreciated: https://community.senaite.org/t/senaite-offline-feature/953/1

Hello everyone, was wondering if anyone can reproduce this,
when adding samples
the client cccontacts gets populated but unpopulates all client contacts from the second sample.

and this seems to be due to the line line (triggers a blur) on function set_reference_field_query, when commented out it works but may have other purposes.

Kind regards

How do I close this page?
Greetings to all. Is Senaite by default supposed to send email reports to patients? So far the variable $recipients is only picking up client contacts, and the responsibles. Running SENAITE Core 1.3.5, SENAITE Health 1.2.5, SENAITE IMPRESS 1.2.5, SENAITE LIMS 1.3.5. thanks in advance...
Albion Shala

Hi all, I'd like to ask if it is possible to use the Batch Sample Import feature from old BIKA to support adding samples there while the system is offline and then import the excel file whenever the system comes online?


Hello,How to set header and footer of senaite report in web page?
1 reply
Hello everyone. Happy that I found this Lobby. I just installed Senaite 2 with this guide: https://www.senaite.com/docs/installation
on the last part is asking to open a browser (Safari/Chrome/FireFox ...) and navigate to the URL http://localhost:8080 but I'm running Ubuntu Server without GUI. What should I do to visualize the page?
Ronald Munjoma
Hi @x-glitch-z on a computer with a GUI on the same network as your server navigate to your serverip:8080 or install lynx on the server server and run lynx localhost:8080

Hi, I am new to Senaite and the Senaite API. I would like to create an analysis service via the API. I have already used the API to create many other objects (e.g. Client, Client Contact, Container Types, Container, Instrument, etc.).
I have tried the following;

"portal_type": "AnalysisService",
"title": "TEST_NM21",
"parent_path": "/rml_senaite_lims_local_dev/bika_setup/bika_analysisservices",
"Keyword": "test_NM21",
"Category": {"url": ""}
The response is;
"_runtime": 0.16652417182922363,
"message": "object of type 'NoneType' has no len()",
"success": false
Please can someone provide an example of an analysis service API post that works?
Thank you.


We’re sorry, but there seems to be an error…
Here is the full error message:

Traceback (innermost last):
Module ZPublisher.WSGIPublisher, line 162, in transaction_pubevents
Module ZPublisher.WSGIPublisher, line 371, in publish_module
Module ZPublisher.WSGIPublisher, line 274, in publish
Module ZPublisher.mapply, line 85, in mapply
Module ZPublisher.WSGIPublisher, line 63, in call_object
Module senaite.core.browser.controlpanel.setupview, line 42, in call
Module Products.Five.browser.pagetemplatefile, line 126, in call
Module Products.Five.browser.pagetemplatefile, line 61, in call
Module zope.pagetemplate.pagetemplate, line 135, in pt_render
Module Products.PageTemplates.engine, line 378, in call
Module z3c.pt.pagetemplate, line 176, in render
Module chameleon.zpt.template, line 302, in render
Module chameleon.template, line 215, in render
Module chameleon.template, line 192, in render
Module 7d4c1bf5f6953b826ce6c8fe6530f0e8, line 551, in render
Module zope.tales.expressions, line 250, in call
Module Products.PageTemplates.Expressions, line 217, in _eval
Module zope.tales.expressions, line 153, in _eval
Module Products.PageTemplates.Expressions, line 131, in trustedBoboAwareZopeTraverse
Module OFS.Traversable, line 343, in unrestrictedTraverse

  • traceback_info: ([], 'prefs_main_template')
    KeyError: 'prefs_main_template'

    • Expression: "here/prefs_main_template/macros/master"
    • Filename: ... senaite/core/browser/controlpanel/templates/setupview.pt
    • Location: (line 6: col 23)
    • Source: ... al:use-macro="here/prefs_main_template/macros/master"
    • Arguments: repeat: <Products.PageTemplates.engine.RepeatDictWrapper object at 0x7f993cc855f0>
          template: <Products.Five.browser.pagetemplatefile.ViewPageTemplateFile object at 0x7f993e1affd0>
          views: <Products.Five.browser.pagetemplatefile.ViewMapper object at 0x7f993d7e9210>
          request: <WSGIRequest, URL=http://localhost:8080/senaite/@@lims-setup>
          args: ()
          here: <PloneSite at /senaite>
          user: <PropertiedUser 'admin'>
          nothing: None
          translate: <function translate at 0x7f995adbddd0>
          container: <PloneSite at /senaite>
          root: <Application at >
          modules: <Products.PageTemplates.ZRPythonExpr._SecureModuleImporter object at 0x7f9938841f90>
          traverse_subpath: []
          default: <DEFAULT>
          loop: {}
          context: <PloneSite at /senaite>
          view: <Products.Five.browser.metaconfigure.SetupView object at 0x7f993d7e9110>
          target_language: None
          macroname: u'master'
          options: {}
          attrs: {}
hello i'm experiencing this issue when i try to access admin page, how can i resolve it?
Paul VanderWeele

@albionshala Two solutions for power outages include:

1) Co-hosting the site using ZRS or another multi-server database solution
2) Collecting samples in an alternate form, and uploading them to Senaite after power is back up.

I'm not sure if the front-end upload feature still works, but I believe the 2-Dimensional option works, and examples should be available in the senaite.core or senaite.lims Github repo.

You also can upload them directly using the plone.api or senaite.api, either from your own BrowserViews in an add-on, or simply from an administrative Debug session.

Can anyone guide me how to connect EMR to senaite with HL7?
And send back lab result result with lab machine integration
Hi, for a calculation in Senaite LIMS can I return both the result and associated uncertainty?
i am tryingt to use docker-compose.yaml but got no perssion to download the senaite/senaite-latest
Docker Compose is now in the Docker CLI, try `docker compose up`

Pulling zeo (senaite/senaite-latest:)...
ERROR: The image for the service you're trying to recreate has been removed. If you continue, volume data could be lost. Consider backing up your data before continuing.

Continue with the new image? [yN]y
Pulling zeo (senaite/senaite-latest:)...
ERROR: pull access denied for senaite/senaite-latest, repository does not exist or may require 'docker login': denied: requested access to the resource is denied
and ramonski/senaite can be download
PS C:\Users\somewheve\senaite.docker\2.1.0> docker pull senaite
Using default tag: latest
Error response from daemon: pull access denied for senaite, repository does not exist or may require 'docker login': denied: requested access to the resource is denied
Ramon Bartl

@somewheve: This looks to me like your docker-compose .yml is not correct.
Try this one:

version: "3.8"


    container_name: zeo-mysenaite
    image: senaite/senaite:edge
    restart: "unless-stopped"
    command: zeo
      - ./data:/data

    container_name: client1-mysenaite
    image: senaite/senaite:edge
    restart: "unless-stopped"
      - "7011:8080"
      - zeo
          memory: 4GB
      ZEO_ADDRESS: "zeo:8080"
      ADDONS: "senaite.databox senaite.patient senaite.storage"
      SOURCES: "senaite.storage=git https://github.com/senaite/senaite.storage.git branch=2.x,senaite.databox=git https://github.com/senaite/senaite.databox.git branch=master,senaite.patient=git https://github.com/senaite/senaite.patient.git branch=master"

    external: true

And then docker compose up -d

Use at least this version of docker and docker compose:

$ docker compose version
Docker Compose version v2.2.3
$ docker --version
Docker version 20.10.12, build e91ed57
i will try it later
it worked correctly when i used senaite/senaite:edge... you should have a look at https://github.com/senaite/senaite.docker/blob/823c6ec244f91230c1c40a1cd34f7f0e746d185d/latest/docker-compose.yml#L12
Ramon Bartl
Ok, thanks for the hint @somewheve, this might be an issue.
also got problem when using 2.1.0. so the address in project should change with the address of docker
Ramon Bartl
The repository moved recently to the Senaite Organization on Docker Hub:
so 2.1.0 is still in the ramonski/senaite repository
got it
Please I need help installing senaite on ubuntu 20.04.

Hi, we have an assay workflow and want to know if Senaite can handle this. Here is the workflow structure:

  • WorkflowA has 2 steps: StepA and StepB
  • User queues 48-well plates for StepA, e.g. PlateA, PlateB, PlateC
  • StepA is configured to transfers a certain number of samples from queued containers to one output container, e.g. transfer 16 samples from PlateA and PlateC to PlateD
  • StepA should use certain reagents and set certain custom field datas. (We need to track them in LIMS)
  • The output of StepA (PlateD) gets queued for StepB.
  • StepB should pool every 8 samples from the queued containers, e.g. PlateD to a tube container.
  • StepB should use certain reagents and set certain custom field datas.
  • We need to attach certain tracking files to StepB.

We need to be able to configure/define the wf in Senaite UI, but run it only by making API calls from our .NET app.
Could anyone please confirm if Senaite has this capability?
If we want to have a live demo of Senaite capabilities, is there any company that does so?
Thank you, all! 🙃

Please I need help installing senaite on ubuntu 20.04.