Welcome to the SENAITE Community – where the open source LIMS professionals meet. Subscribe to the SENAITE Users List at https://www.senaite.com
Upon new v2.3.0 docker-compose install the application keeps crashing every so often with the following error:
Updating precompiler.
Compiling Python files.
File "/home/senaite/senaitelims/eggs/cp27mu/attrs-21.4.0-py2.7.egg/attr/_next_gen.py", line 26
*,
^
SyntaxError: invalid syntax
File "/home/senaite/senaitelims/eggs/cp27mu/zodbpickle-2.2.0-py2.7-linux-x86_64.egg/zodbpickle/pickletools_3.py", line 2049
print("%5d:" % pos, end=' ', file=out)
^
SyntaxError: invalid syntax
File "/home/senaite/senaitelims/eggs/cp27mu/zodbpickle-2.2.0-py2.7-linux-x86_64.egg/zodbpickle/pickle_3.py", line 178
def init(self, file, protocol=None, *, fix_imports=True):
^
SyntaxError: invalid syntax
File "/home/senaite/senaitelims/eggs/cp27mu/zodbpickle-2.2.0-py2.7-linux-x86_64.egg/zodbpickle/tests/pickletester_3.py", line 146
class use_metaclass(object, metaclass=metaclass):
^
SyntaxError: invalid syntax
Good morning everyone,
anyone that gets this erro when clicking on the Configuration Registry
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 plone.app.registry.browser.records, line 208, in __call__
Module z3c.form.form, line 239, in __call__
Module z3c.form.form, line 163, in render
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 c626b7f033b3df0da7f5d2cccfdc7365, line 1527, in render
Module b4387ace4cbc752f3f3926a39523abbc, line 382, in render_master
Module e4dada1bc3509ac316a751b9eade5f1f, line 1065, in render_master
Module zope.tales.pythonexpr, line 73, in __call__
- __traceback_info__: (bootstrapview.get_data_settings())
Module <string>, line 1, in <module>
Module senaite.core.browser.bootstrap.bootstrap, line 159, in get_data_settings
Module bika.lims.api, line 472, in get_portal_type
Module bika.lims.api, line 347, in fail
APIError: <plone.app.registry.registry.Registry object at 0x7f2ab8c89ed8 oid 0xd2f in <Connection at 7f2ae69b7510>> is not supported.
- Expression: " python:bootstrapview.get_data_settings"
- Filename: ... te/core/browser/main_template/templates/main_template.pt
- Location: (line 65: col 24)
- Source: cls python:bootstrapview.get_columns_classes(view)"
its seems to be related to https://github.com/senaite/senaite.core/blob/2.x/src/senaite/core/browser/bootstrap/bootstrap.py#L159
get_portal_type
takes a brain or object and not context
get_portal_type
isn't the problem but self.context returns a registry object type on http://localhost:8080/mysite/portal_registry (Pdb) self.context
<plone.app.registry.registry.Registry object at 0x7f21fe3f7ed0 oid 0x1cece in <Connection at 7f220e93d2d0>>
"data-portal-type": api.get_portal_type(self.context),
can be replaced with
"data-portal-type": self.context.portal_type,
We’re sorry, but there seems to be an error…
APIError
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 plone.app.registry.browser.records, line 208, in __call__
Module z3c.form.form, line 239, in __call__
Module z3c.form.form, line 163, in render
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 5dcfdfbaf6651d02557d99d6e1d7d5f5, line 1527, in render
Module a78c3433348e8ed1014bc14c60a3717b, line 382, in render_master
Module ebc65d336ed6a24c5f619c027b166db6, line 1065, in render_master
Module zope.tales.pythonexpr, line 73, in __call__
- __traceback_info__: (bootstrapview.get_data_settings())
Module <string>, line 1, in <module>
Module senaite.core.browser.bootstrap.bootstrap, line 159, in get_data_settings
Module bika.lims.api, line 472, in get_portal_type
Module bika.lims.api, line 347, in fail
APIError: <plone.app.registry.registry.Registry object at 0x401b647e50 oid 0xc30 in <Connection at 4014546a90>> is not supported.
- Expression: " python:bootstrapview.get_data_settings"
- Filename: ... te/core/browser/main_template/templates/main_template.pt
- Location: (line 65: col 24)
- Source: cls python:bootstrapview.get_columns_classes(view)"
^
- Expression: "context/@@main_template/macros/master"
- Filename: ... aite/core/skins/senaite_templates/prefs_main_template.pt
- Location: (line 2: col 30)
- Source: ... tal:use-macro="context/@@main_template/macros/master">
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- Expression: "here/prefs_main_template/macros/master"
- Filename: ... y2.7.egg/plone/app/registry/browser/templates/records.pt
- Location: (line 6: col 23)
- Source: ... al:use-macro="here/prefs_main_template/macros/master"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- Arguments: repeat: <Products.PageTemplates.engine.RepeatDictWrapper object at 0x402a026190>
template: <Products.Five.browser.pagetemplatefile.ViewPageTemplateFile object at 0x4032df3210>
views: <Products.Five.browser.pagetemplatefile.ViewMapper object at 0x40298dc410>
request: <WSGIRequest, URL=http://localhost:8086/bnitmsenaite/portal_registry/@@configuration_registry>
args: ()
here: <plone.app.registry.registry.Registry object at 0x401b647e50 oid 0xc30 in <Connection at 4014546a90>>
user: <PropertiedUser 'admin'>
nothing: None
translate: <function translate at 0x40297d99d0>
container: <plone.app.registry.registry.Registry object at 0x401b647e50 oid 0xc30 in <Connection at 4014546a90>>
root: <Application at >
modules: <Products.PageTemplates.ZRPythonExpr._SecureModuleImporter object at 0x40063a0d50>
options: {}
traverse_subpath: []
default: <DEFAULT>
loop: {}
context: <plone.app.registry.registry.Registry object at 0x401b647e50 oid 0xc30 in <Connection at 4014546a90>>
view: <Products.Five.browser.metaconfigure.RecordsControlPanel object at 0x4029911810>
target_language: None
macroname: u'master'
attrs: {}
2.x
docker image instead of the tagged v2.3.0
after it has been merged.
2.x
or edge
already since the version bump to 2.4.0: https://github.com/senaite/senaite.core/actions/workflows/docker.yml
{'Category': u'da1107d98a0e455da8648cb92c33aabf', 'ReferenceAnalysesGroupID': u'QC-007-001', 'LowerDetectionLimitSoil': u'2.5', 'Uncertainties': [], '_signature': '\xa1\x83\xcb\x0c\x01\xc0\t\xfd\xd1V\xf8\xab\xfdYP\x06', 'SortKey': None, 'marshall_hook': None, 'RetractedAnalysesPdfReport': <plone.app.blob.field.BlobWrapper object at 0x7f7b485497d0>, 'Attachment': [], 'Department': u'371de92094ac41e1b904c48b0f80647c', 'DuplicateVariation': (0, 0), '_senaite_core__Field__Edit_Analysis_Hidden_Permission': ('LabManager', 'Manager', 'LabClerk', 'Publisher'), '_at_creation_flag': False, 'title': u'Sulfate', 'demarshall_hook': None, 'ProtocolID': u'EPA 9038', 'id': 'SA-100', 'Precision': 1, '__provides__': <zope.interface.Provides object at 0x7f7b4854b610>, 'SurrogateRawSpike': (0, 0), 'DilutionFactor': (1, 0), 'FinalAmount': (250, 0), '_EtagSupport__etag': 'ts65281572.92', 'SurrogateLimitsSoil': u'', 'Analyst': u'', 'UpperDetectionLimit': (1000000000, 0), 'Keyword': u'sulfate', 'NumberOfRequiredVerifications': 1, '__annotations__': <BTrees.OOBTree.OOBTree object at 0x7f7b48549a50>, 'portal_type': 'ReferenceAnalysis', 'Multiplier': (10, 0), '_at_uid': '613faa816ef441eeac9d9a675ca19ac0', 'ResultAnalysisDate': None, 'at_references': <Folder at at_references>, '_Modify_portal_content_Permission': (), 'DetectionLimitOperand': u'', 'VAT': (0, 0), 'PrecisionFromUncertainty': False, 'AnalysisService': u'87e212b493264fc297fecfaf88752596', 'InterimFields': [], 'InitAmount': (25, 0), 'ScientificName': False, 'RawResult': (18, 66), 'Unit': u'mg/L', 'RawQuantLimit': (5, 0), 'RetestOf': u'', 'ShortTitle': u'', 'BulkPrice': (0, 0), 'ExponentialFormatPrecision': 7, 'creation_date': DateTime('2019/02/11 17:47:18.397642 US/Central'), 'Instrument': u'1c500ae80fae431d8186d033e710f3fc', 'StringResult': False, 'SurrogateLimitsWater': u'', 'AnalysisFlag': u'', 'Hidden': False, 'PointOfCapture': u'lab', 'UpperDetectionLimitSoil': (1000000000, 0), '_senaite_core__Edit_Results_Permission': (), 'ResultCaptureDate': DateTime('2022/10/09 02:07:36.419525 UTC'), 'MaxTimeAllowed': {'hours': '0', 'minutes': '0', 'days': '5'}, 'modification_date': DateTime('2022/09/19 12:58:28.465855 GMT-5'), 'RawDetectionLimit': (2, 5000000), 'workflow_history': {'bika_referenceanalysis_workflow': ({'action': None, 'review_state': 'assigned', 'actor': 'jeffb', 'comments': '', 'time': DateTime('2022/10/09 02:04:40.461077 UTC')}, {'action': 'submit', 'review_state': 'to_be_verified', 'actor': 'jeffb', 'comments': '', 'time': DateTime('2022/10/09 02:07:36.423109 UTC')}, {'action': 'verify', 'review_state': 'verified', 'actor': 'jeffb', 'comments': '', 'time': DateTime('2022/10/09 02:12:52.777264 UTC')})}, 'ResultOptions': [], 'Method': u'b67a778abde54d9dbd414a38f68af7d9', 'RawDetectionLimitSoil': (2, 5000000), 'Remarks': <BaseUnit at Remarks>, 'CommercialID': u'', '_senaite_core__Field__Edit_Analysis_Result_Permission': (), 'AllowManualDetectionLimit': False, 'AttachmentOption': u'p', 'ResultsRange': {}, 'Accredited': False, 'Surrogate': False, 'Uncertainty': None, '_senaite_core__View_Results_Permission': ('Analyst', 'LabClerk', 'LabManager', 'Manager', 'RegulatoryInspector'), 'Price': (35, 0), 'ReferenceType': u'c', 'LowerDetectionLimit': u'25', 'SoilUnit': u'ppm', 'InstrumentEntryOfResults': True, 'ManualEntryOfResults': True, 'DetectionLimitSelector': False, 'AdjustResult': u'True', '_senaite_core__Field__Edit_Analysis_Remarks_Permission': (), 'Result': u'187', '_md': {'effectiveDate': None, 'language': u'en', 'rights': <BaseUnit at rights>, 'subject': (), 'location': u'', 'expirationDate': None, 'contributors': (), 'allowDiscussion': None, 'creators': (u'admin',), 'description': <BaseUnit at description>}, '__ac_local_roles__': {'jeffb': ['Owner']}, 'AllowManualUncertainty': False, 'SelfVerification': -1}
hello,everyone!I install senaite on unbuntu18.04, refer to the documentation https://www.senaite.com/docs/installation .``` (base) senaite@senaite-OptiPlex-7060:~/senaitelims$ PYTHONHTTPSVERIFY=0
buildoutInstalling instance.
While:
Installing instance.
An internal error occurred due to a bug in either zc.buildout or in a
recipe being used:
Traceback (most recent call last):
File "/home/senaite/miniconda2/lib/python2.7/site-packages/zc/buildout/buildout.py", line 2174, in main
getattr(buildout, command)(args)
File "/home/senaite/miniconda2/lib/python2.7/site-packages/zc/buildout/buildout.py", line 817, in install
installed_files = self[part]._call(recipe.install)
File "/home/senaite/miniconda2/lib/python2.7/site-packages/zc/buildout/buildout.py", line 1603, in _call
return f()
File "/home/senaite/buildout-cache/eggs/plone.recipe.zope2instance-4.4.1-py2.7.egg/plone/recipe/zope2instance/init.py", line 169, in install
installed.extend(self.install_scripts())
File "/home/senaite/buildout-cache/eggs/plone.recipe.zope2instance-4.4.1-py2.7.egg/plone/recipe/zope2instance/init.py", line 668, in install_scripts
requirements, ws = self.egg.working_set(['plone.recipe.zope2instance'])
File "/home/senaite/buildout-cache/eggs/zc.recipe.egg-1.3.2-py2.7.egg/zc/recipe/egg/egg.py", line 101, in working_set
**kw)
File "/home/senaite/miniconda2/lib/python2.7/site-packages/zc/buildout/easy_install.py", line 957, in install
return installer.install(specs, working_set)
File "/home/senaite/miniconda2/lib/python2.7/site-packages/zc/buildout/easy_install.py", line 674, in install
for spec in specs]
File "/home/senaite/miniconda2/lib/python2.7/site-packages/pkg_resources/init.py", line 2995, in parse
req, = parse_requirements(s)
File "/home/senaite/miniconda2/lib/python2.7/site-packages/pkg_resources/init.py", line 2942, in parse_requirements
yield Requirement(line)
File "/home/senaite/miniconda2/lib/python2.7/site-packages/pkg_resources/init.py", line 2951, in init
raise RequirementParseError(str(e))
RequirementParseError: Invalid requirement, parse error at "'='"
```
Getting error when importing the senaite setup load
Error Traceback (most recent call last): File "/home/senaite/senaitelims/src/senaite.core/src/senaite/core/browser/form/adapters/data_import.py", line 43, in handle_data_import LoadSetupData(self.context, self.request)() File "/home/senaite/senaitelims/src/senaite.core/src/senaite/core/exportimport/load_setup_data.py", line 119, in call adapter(self, workbook, self.dataset_project, self.dataset_name) File "/home/senaite/senaitelims/src/senaite.core/src/senaite/core/exportimport/setupdata/init.py", line 115, in call self.Import() File "/home/senaite/senaitelims/src/senaite.core/src/senaite/core/exportimport/setupdata/init.py", line 546, in Import raise Exception(message) Exception: Client %s has no Name
Can any help with this error? the clients' sheet has a Name column.
_
@crazy_babaq_twitter Here is an UNOFFICIAL document I put together for everyone struggling to figure out how to install senaite for the first time with no knowledge of LINUX or cloud or anything. Hope it helps:
An Easy, Beginner's Guide, .Step-by-Step Senaite Cloud Install with Digital Ocean and Docker
(base) senaite@senaite-OptiPlex-7060:~/Plone-5.2.9-UnifiedInstaller$ ./install.sh standalone --target=/home/senaite --instance=senaitelims --password=admin --with-python=/home/senaite/miniconda2/envs/senaite/bin/python2.7
Testing /home/senaite/miniconda2/envs/senaite/bin/python2.7 for Zope/Plone requirements....
/home/senaite/miniconda2/envs/senaite/bin/python2.7 looks OK. We will use it.
Rootless install method chosen. Will install for use by system user senaite
Detailed installation log being written to /home/senaite/Plone-5.2.9-UnifiedInstaller/install.log
Installing Plone 5.2.9 at /home/senaite
Creating Python virtual environment.
New python executable in /home/senaite/senaitelims/bin/python2.7
Also creating executable in /home/senaite/senaitelims/bin/python
Installing setuptools, pip, wheel...
done.
Installing Python requirements in virtual environment.
Unable to install Python requirements in virtual environment.
Installation has failed.
See the detailed installation log at /home/senaite/Plone-5.2.9-UnifiedInstaller/install.log
to determine the cause.
Creating Python virtual environment.
Virtualenv successfully created
Installing Python requirements in virtual environment.
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', error(0, 'Error'))': /release/5.2.9/requirements.txt
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', error(0, 'Error'))': /release/5.2.9/requirements.txt
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', error(0, 'Error'))': /release/5.2.9/requirements.txt
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', error(0, 'Error'))': /release/5.2.9/requirements.txt
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', error(0, 'Error'))': /release/5.2.9/requirements.txt
ERROR: Could not install packages due to an EnvironmentError: HTTPSConnectionPool(host='dist.plone.org', port=443): Max retries exceeded with url: /release/5.2.9/requirements.txt (Caused by ProxyError('Cannot connect to proxy.', error(0, 'Error')))
Unable to install Python requirements in virtual environment.
Greetings to all. I'd like to add the analyst signature to the published report. i tried the following and it isn't working. any pointers are well appreciated on moving this forward. thanks again.
<tal:analysts repeat="analyst python:model.getAnalysts()">
<td style="border:none">
<div>
<img tal:condition="analysts/Signature|nothing"
tal:attributes="src string:${analysts/absolute_url}/Signature" style="height:35px"/>
</div>
<div class="font-weight-bold">
<span tal:content="analysts/Salutation|nothing"></span>
<span tal:condition="analysts/Salutation|nothing"> </span>
<span tal:content="analysts/Fullname|nothing"></span>
</div>
<div>
<span tal:content="analysts/JobTitle|nothing"></span>
</div>
<div>
<span tal:content="analysts/DefaultDepartment/title|nothing"></span>
</div>
</td>
</tal:analysts>
Is there a way to prevent the duplication of Batch objects into the same UID when they are created?
In our laboratory's case, a Batch is created for every request. A request would sometimes contain more than one sample. The certificate to publish would always contain all of the samples in the request. This is the reason why a new batch is always created per request.
No errors are reported while the Batch is created, and the analyses are performed, submitted and verified. However, when the users try to publish a certificate, this error sometimes appears:
https://i.imgur.com/5sznezE.png
It happens about once a month, as reported by the users. Is there a way to prevent it from happening?
Hello everyone,
It seems that for a while now there is no history awareness / versioning on ASs? So once an AS keyword has been used, it cannot be edited, https://mysite.com/bika_setup/bika_analysisservices/analysisservice-12, and a message, ‘Keyword is used in active analyses and can not be changed anymore’ is displayed
I have a case now where an instrument will be used to capture some results which were done manually before with arbitrary keyword , e.g. ControllerConductivity. In the instrument’s import file conductivity_from_controller is used and i want to edit the AS Keyword to match
Would that be possible at all under any circumstances? Say once all the Sample using the analysis are cancelled or published.
Only way out seems that i have to deactivate these and create new ASs with the correct keywords ( but then all of Profiles, Calculations, Reference Definitions, Specifications and Worksheet Templates are affected and the AS have to be replaced there too