Welcome to the SENAITE Community – where the open source LIMS professionals meet. Subscribe to the SENAITE Users List at https://www.senaite.com
Hi @faytrow
Sample/AR is created herehttps://github.com/senaite/senaite.core/blob/a39760a8bdff04aa020dbe572cbbc54dbb910450/src/bika/lims/utils/analysisrequest.py#L83
after being imported herehttps://github.com/senaite/senaite.core/blob/a39760a8bdff04aa020dbe572cbbc54dbb910450/src/bika/lims/browser/analysisrequest/add2.py#L39
also you may wanna have a look at SENAITE.QUEUE and change a few imports to make it work with SENAITE CORE 2.x
After looking into Senaite.Queue more, it looks like it will require a major overhaul to work with Senaite 2.x as the clock_server is no longer supported with Plone 5.2.
waitress
is used as WSGI server ...
Hi, can anyone help me in solving the problem of mixed content error when we shift the senaite portal from http to secure SSL (HTTPS).
@AbsTheAnalyst: You probably missed the rewrite rule:
https://stackoverflow.com/questions/55335907/senaite-lims-plone-4-3-18-css-not-working-on-nginx-with-https-enabled
Why is there a major overhaul is required? You could just use a cron-job instead and call the URL with username/password submitted
I've used cron for large scheduled tasks on off hours, but I guess I hadn't tried calling the queue URLs directly from outside of the application to handle high-load concurrency the way senaite.queue would.
If I understand correctly, would you use z3c.recipe.usercrontab to allow plone users to create the cronjobs during operations from workflows and views, and then refactor Senaite.Queue to read /etc/cron.d
and re-queue the cron jobs X-number of times if they fail due to zodb conflict errors?
Anyhow, I was not aware that the clock server is no longer supported. Probably because
waitress
is used as WSGI server ...
Yes, it does seem to be due to a shift with WSGI and waitress as opposed to ZServer, but I don't fully understand all of how that is incorporated into Plone. It seemed to have been dropped in 5.2 though.
Does anyone know if there is a flag for the listing tables from senaite.app.listing that allows the header row to remain visible at the top while scrolling down?
Something similar to the FixedHeader
flag in DataTables.
Changelog 2.3.0 (2022-10-04)
senaite.core 2.2.0 → 2.3.0
https://github.com/senaite/senaite.core/releases/tag/v2.3.0
senaite.impress 2.2.0 → 2.3.0
https://github.com/senaite/senaite.impress/releases/tag/2.3.0
senaite.app.supermodel 2.2.0 → 2.3.0
https://github.com/senaite/senaite.app.supermodel/releases/tag/2.3.0
senaite.app.listing 2.2.0 → 2.3.0
https://github.com/senaite/senaite.app.listing/releases/tag/2.3.0
senaite.app.spotlight 2.2.0 → 2.3.0
https://github.com/senaite/senaite.app.spotlight/releases/tag/2.3.0
senaite.jsonapi 2.2.0 → 2.3.0
https://github.com/senaite/senaite.jsonapi/releases/tag/2.3.0
Plone 5.2.7 → 5.2.9
https://dist.plone.org/release/5.2.9/RELEASE-NOTES.md
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