Giter Club home page Giter Club logo

Comments (17)

grulisco avatar grulisco commented on June 21, 2024

still a problem with senaite 1.1.6

from senaite.core.

ramonski avatar ramonski commented on June 21, 2024

Produces an ugly traceback and therefore set to high priority

from senaite.core.

ramonski avatar ramonski commented on June 21, 2024

Maybe related to bikalims/bika.lims#2063

from senaite.core.

grulisco avatar grulisco commented on June 21, 2024

@ramonski not really. I just did a test with a single AR with the same error.
bikalims#2063 is about 2 or more ARs.

from senaite.core.

grulisco avatar grulisco commented on June 21, 2024

On senaite 1.2.3 (our own test instance) it is still a problem with similar traceback. But Batchbook works with ARs with a few particular AS, but most ASs don't work - and I don't see any reason for that.
At demo senaite.ridingbytes.com most existing batches show batchbooks correctly, but one new batch produces another error:
grafik

from senaite.core.

rockfruit avatar rockfruit commented on June 21, 2024

I have tested with 5 ARs containing every analysis service present in the pre-configured test data. In all states up to and including 'Published', I cannot cause this error to appear. I'll need help to reproduce.

In the meanwhile, please try clearing your browser's cookies for the LIMS site, this may help.

from senaite.core.

ramonski avatar ramonski commented on June 21, 2024

Just checking this one @rockfruit and fall over this issue:

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 bika.lims.browser.batch.batchbook, line 118, in __call__
  Module bika.lims.browser.bika_listing, line 581, in __call__
  Module Products.Five.browser.pagetemplatefile, line 125, in __call__
  Module Products.Five.browser.pagetemplatefile, line 59, in __call__
  Module zope.pagetemplate.pagetemplate, line 132, in pt_render
  Module five.pt.engine, line 98, in __call__
  Module z3c.pt.pagetemplate, line 163, in render
  Module chameleon.zpt.template, line 276, in render
  Module chameleon.template, line 191, in render
  Module chameleon.template, line 171, in render
  Module cedcf05a4e6dcf01aa22154eed6a5326.py, line 590, in render
  Module fc2518f52a3a917b6a3abc05fa506565.py, line 1686, in render_master
  Module fc2518f52a3a917b6a3abc05fa506565.py, line 479, in render_content
  Module cedcf05a4e6dcf01aa22154eed6a5326.py, line 189, in __fill_content_title
  Module Products.CMFCore.FSPythonScript, line 127, in __call__
  Module Shared.DC.Scripts.Bindings, line 322, in __call__
  Module Shared.DC.Scripts.Bindings, line 359, in _bindAndExec
  Module Products.PythonScripts.PythonScript, line 344, in _exec
  Module script, line 21, in translate
   - <FSPythonScript at /senaite/batches/B18-0038/translate>
   - Line 21
  Module Products.CMFPlone.TranslationServiceTool, line 49, in translate
  Module zope.i18n, line 107, in translate
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 10: ordinal not in range(128)

 - Stream:     LOG XXXXXXö
                         ^
 - Expression: "python:view.context.translate(view.title)"
 - Filename:   ... senaite.core/bika/lims/browser/templates/bika_listing.pt
 - Location:   (line 22: col 27)
 - Source:     tal:content="python:view.context.translate(view.title)"/>
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 - Arguments:  repeat: {...} (0)
               template: <ViewPageTemplateFile - at 0x7fb8d94bbd50>
               views: <ViewMapper - at 0x7fb8da0056d0>
               modules: <instance - at 0x7fb90f2e1ea8>
               args: <tuple - at 0x7fb8d93b6c10>
               here: <ImplicitAcquisitionWrapper B18-0038 at 0x7fb8d9c80460>
               user: <ImplicitAcquisitionWrapper - at 0x7fb8d9c805a0>
               nothing: <NoneType - at 0x8fe4d0>
               translate: <function translate at 0x7fb8da012848>
               container: <ImplicitAcquisitionWrapper B18-0038 at 0x7fb8d9c80460>
               request: <instance - at 0x7fb8d917ecf8>
               wrapped_repeat: <SafeMapping - at 0x7fb8d8d10998>
               traverse_subpath: <list - at 0x7fb8d96e1b00>
               default: <object - at 0x7fb916e6b560>
               loop: {...} (1)
               context: <ImplicitAcquisitionWrapper B18-0038 at 0x7fb8d9c80460>
               view: <BatchBookView batchbook at 0x7fb8da005d10>
               target_language: <NoneType - at 0x8fe4d0>
               root: <ImplicitAcquisitionWrapper Zope at 0x7fb8d9afa460>
               options: {...} (0)

Shall I add a new issue for that?

from senaite.core.

ramonski avatar ramonski commented on June 21, 2024

Another issue re. Batchbooks:

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 bika.lims.browser.batch.batchbook, line 118, in __call__
  Module bika.lims.browser.bika_listing, line 581, in __call__
  Module Products.Five.browser.pagetemplatefile, line 125, in __call__
  Module Products.Five.browser.pagetemplatefile, line 59, in __call__
  Module zope.pagetemplate.pagetemplate, line 132, in pt_render
  Module five.pt.engine, line 98, in __call__
  Module z3c.pt.pagetemplate, line 163, in render
  Module chameleon.zpt.template, line 276, in render
  Module chameleon.template, line 171, in render
  Module cedcf05a4e6dcf01aa22154eed6a5326.py, line 590, in render
  Module fc2518f52a3a917b6a3abc05fa506565.py, line 1686, in render_master
  Module fc2518f52a3a917b6a3abc05fa506565.py, line 665, in render_content
  Module cedcf05a4e6dcf01aa22154eed6a5326.py, line 488, in __fill_content_core
  Module five.pt.expressions, line 161, in __call__
  Module bika.lims.browser.bika_listing, line 1611, in contents_table
  Module Products.Five.browser.pagetemplatefile, line 125, in __call__
  Module Products.Five.browser.pagetemplatefile, line 59, in __call__
  Module zope.pagetemplate.pagetemplate, line 132, in pt_render
  Module five.pt.engine, line 98, in __call__
  Module z3c.pt.pagetemplate, line 163, in render
  Module chameleon.zpt.template, line 276, in render
  Module chameleon.template, line 191, in render
  Module chameleon.template, line 171, in render
  Module b998537621d860c41d5d0f8aca1ae961.py, line 1647, in render
  Module json, line 244, in dumps
  Module json.encoder, line 207, in encode
  Module json.encoder, line 270, in iterencode
  Module json.encoder, line 184, in default
TypeError: <bound method Analysis.Title of <Analysis at /senaite/clients/client-12/18-00166-R1/conc_caso4_vdi3492>> is not JSON serializable

 - Expression: "view/contents_table"
 - Filename:   ... senaite.core/bika/lims/browser/templates/bika_listing.pt
 - Location:   (line 51: col 34)
 - Source:     tal:content="structure view/contents_table"/>
                                      ^^^^^^^^^^^^^^^^^^^
 - Expression: "python:modules['json'].dumps(toggle_cols)"
 - Filename:   ... e.core/bika/lims/browser/templates/bika_listing_table.pt
 - Location:   (line 217: col 42)
 - Source:     value python:modules['json'].dumps(toggle_cols);"/>
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 - Arguments:  rows_only: False
               modules: <instance - at 0x7fb90f2e1ea8>
               table_only: False
               loop: {...} (0)
               ViewResults: 1
               EditAnalyses: 1
               toggle_cols: {...} (20)
               container: <ImplicitAcquisitionWrapper B18-0028 at 0x7fb8d98b0910>
               form_id: list
               sm: <SecurityManager - at 0x7fb8d9ce31b8>
               specification: <NoneType - at 0x8fe4d0>
               wrapped_repeat: <SafeMapping - at 0x7fb8d9a0b470>
               traverse_subpath: <list - at 0x7fb8d93e5f80>
               template: <ViewPageTemplateFile - at 0x7fb8da8860d0>
               nosortclass: nosort
               review_state: {...} (5)
               translate: <function translate at 0x7fb8d907ab18>
               columns: {...} (20)
               repeat: {...} (0)
               column_list: <list - at 0x7fb8d906f3f8>
               views: <ViewMapper - at 0x7fb8d9cdcb10>
               args: <tuple - at 0x7fb8d9b9fb50>
               here: <ImplicitAcquisitionWrapper B18-0028 at 0x7fb8d98b0910>
               portal: <ImplicitAcquisitionWrapper senaite at 0x7fb8d9cb00f0>
               user: <ImplicitAcquisitionWrapper - at 0x7fb8d98b06e0>
               nothing: <NoneType - at 0x8fe4d0>
               nr_cols: 21
               roles: <list - at 0x7fb8d9d51a28>
               default: <object - at 0x7fb916e6b560>
               request: <instance - at 0x7fb8d93d5c68>
               options: {...} (0)
               review_state_id: default
               t: {...} (5)
               context: <ImplicitAcquisitionWrapper B18-0028 at 0x7fb8d98b0910>
               view: <BikaListingTable - at 0x7fb8d9cebad0>
               target_language: <NoneType - at 0x8fe4d0>
               root: <ImplicitAcquisitionWrapper Zope at 0x7fb8d9722e10>
               col: conc_ag_vdi3492
               tabindex: <generator tabindex at 0x7fb8d9600550>

Seems like this fails depending on the values in the content

from senaite.core.

ramonski avatar ramonski commented on June 21, 2024

Looks to me like the Title method on the Analysis is not called?

from senaite.core.

rockfruit avatar rockfruit commented on June 21, 2024

Yes that is what I see too, and I cannot reproduce it. Are you able to reproduce this locally on your machine? If so, I'd like to have a conversation with you.

from senaite.core.

rockfruit avatar rockfruit commented on June 21, 2024

@ramonski the two tracebacks seem to be related, so this one issue is a good home for both of them. But without being able to put a debugger in there, there isn't really enough information in the traces for me to be sure that I fix this correctly. It does not appear to be the kind of error I'd expect to cause an "intermittent" exception!

from senaite.core.

ramonski avatar ramonski commented on June 21, 2024

ok, skip that one until next week. We'll talk than anyway and probably fix it together then.

from senaite.core.

ramonski avatar ramonski commented on June 21, 2024

Issue still appears :(

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 bika.lims.browser.batch.batchbook, line 118, in __call__
  Module bika.lims.browser.bika_listing, line 581, in __call__
  Module Products.Five.browser.pagetemplatefile, line 125, in __call__
  Module Products.Five.browser.pagetemplatefile, line 59, in __call__
  Module zope.pagetemplate.pagetemplate, line 132, in pt_render
  Module five.pt.engine, line 98, in __call__
  Module z3c.pt.pagetemplate, line 158, in render
  Module chameleon.zpt.template, line 297, in render
  Module chameleon.template, line 191, in render
  Module chameleon.template, line 171, in render
  Module 71fd98635e395b5af35ca08e526db57e.py, line 466, in render
  Module 3102d52f61f8602fbbd4f1d1ab85400a.py, line 1466, in render_master
  Module 3102d52f61f8602fbbd4f1d1ab85400a.py, line 449, in render_content
  Module 71fd98635e395b5af35ca08e526db57e.py, line 186, in __fill_content_title
  Module Products.CMFCore.FSPythonScript, line 127, in __call__
  Module Shared.DC.Scripts.Bindings, line 322, in __call__
  Module Shared.DC.Scripts.Bindings, line 359, in _bindAndExec
  Module Products.PythonScripts.PythonScript, line 344, in _exec
  Module script, line 21, in translate
   - <FSPythonScript at /senaite/batches/B18-0038/translate>
   - Line 21
  Module Products.CMFPlone.TranslationServiceTool, line 49, in translate
  Module zope.i18n, line 107, in translate
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 10: ordinal not in range(128)

 - Stream:     LOG Bruchköbel
                         ^
 - Expression: "provider:plone.abovecontenttitle"
 - Filename:   ... rc/senaite/lims/skins/senaite_templates/main_template.pt
 - Location:   (line 126: col 91)
 - Source:     ... nt="structure provider:plone.abovecontenttitle" tal:conditio ...
                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 - Stream:     LOG Bruchköbel
                         ^
 - Expression: "here/main_template/macros/master"
 - Filename:   ... senaite.core/bika/lims/browser/templates/bika_listing.pt
 - Location:   (line 5: col 23)
 - Source:     metal:use-macro="here/main_template/macros/master"
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 - Arguments:  repeat: {...} (0)
               template: <ViewPageTemplateFile - at 0x117dbb690>
               views: <ViewMapper - at 0x118243550>
               modules: <instance - at 0x10925f830>
               args: <tuple - at 0x1175ee550>
               here: <ImplicitAcquisitionWrapper B18-0038 at 0x11612eeb0>
               user: <ImplicitAcquisitionWrapper - at 0x116110f50>
               nothing: <NoneType - at 0x108071e08>
               translate: <function translate at 0x1187ce758>
               container: <ImplicitAcquisitionWrapper B18-0038 at 0x11612eeb0>
               root: <ImplicitAcquisitionWrapper Zope at 0x113683fa0>
               request: <instance - at 0x1187c6d88>
               wrapped_repeat: <SafeMapping - at 0x1186e9d08>
               traverse_subpath: <list - at 0x1187cb878>
               default: <object - at 0x108155bf0>
               loop: {...} (1)
               context: <ImplicitAcquisitionWrapper B18-0038 at 0x11612eeb0>
               view: <BatchBookView batchbook at 0x1183fd190>
               target_language: <NoneType - at 0x108071e08>
               macroname: master
               options: {...} (0)

from senaite.core.

ramonski avatar ramonski commented on June 21, 2024

This one as well:

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 bika.lims.browser.batch.batchbook, line 118, in __call__
  Module bika.lims.browser.bika_listing, line 581, in __call__
  Module Products.Five.browser.pagetemplatefile, line 125, in __call__
  Module Products.Five.browser.pagetemplatefile, line 59, in __call__
  Module zope.pagetemplate.pagetemplate, line 132, in pt_render
  Module five.pt.engine, line 98, in __call__
  Module z3c.pt.pagetemplate, line 158, in render
  Module chameleon.zpt.template, line 297, in render
  Module chameleon.template, line 171, in render
  Module 71fd98635e395b5af35ca08e526db57e.py, line 466, in render
  Module 3102d52f61f8602fbbd4f1d1ab85400a.py, line 1466, in render_master
  Module 3102d52f61f8602fbbd4f1d1ab85400a.py, line 604, in render_content
  Module 71fd98635e395b5af35ca08e526db57e.py, line 444, in __fill_content_core
  Module five.pt.expressions, line 161, in __call__
  Module bika.lims.browser.bika_listing, line 1611, in contents_table
  Module Products.Five.browser.pagetemplatefile, line 125, in __call__
  Module Products.Five.browser.pagetemplatefile, line 59, in __call__
  Module zope.pagetemplate.pagetemplate, line 132, in pt_render
  Module five.pt.engine, line 98, in __call__
  Module z3c.pt.pagetemplate, line 158, in render
  Module chameleon.zpt.template, line 297, in render
  Module chameleon.template, line 171, in render
  Module 73fe27413aaf55cacb02b38d5be8d810.py, line 1636, in render
  Module bika.lims.browser.bika_listing, line 1825, in rendered_items
  Module Products.Five.browser.pagetemplatefile, line 125, in __call__
  Module Products.Five.browser.pagetemplatefile, line 59, in __call__
  Module zope.pagetemplate.pagetemplate, line 132, in pt_render
  Module five.pt.engine, line 98, in __call__
  Module z3c.pt.pagetemplate, line 158, in render
  Module chameleon.zpt.template, line 297, in render
  Module chameleon.template, line 191, in render
  Module chameleon.template, line 171, in render
  Module e7c9bd5e0c4797ed6b4f2ec07d989f86.py, line 1389, in render
KeyError: 'anz_c_vdi3492'

 - Expression: "python:type(item[column]) == type({})"
 - Filename:   ... /bika/lims/browser/templates/bika_listing_table_items.pt
 - Location:   (line 172: col 35)
 - Source:     tal:condition="python:type(item[column]) == type({})">
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 - Expression: "python:view.rendered_items(cat)"
 - Filename:   ... e.core/bika/lims/browser/templates/bika_listing_table.pt
 - Location:   (line 263: col 43)
 - Source:     ... eplace="structure python:view.rendered_items(cat)"/>
                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 - Expression: "provider:plone.abovecontentbody"
 - Filename:   ... rc/senaite/lims/skins/senaite_templates/main_template.pt
 - Location:   (line 148: col 90)
 - Source:     ... ent="structure provider:plone.abovecontentbody" tal:conditio ...
                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 - Expression: "here/main_template/macros/master"
 - Filename:   ... senaite.core/bika/lims/browser/templates/bika_listing.pt
 - Location:   (line 5: col 23)
 - Source:     metal:use-macro="here/main_template/macros/master"
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 - Arguments:  allow_edit: False
               required: False
               tmpstyle: border-bottom:0 !important;
               colspan: 1
               request: <instance - at 0x118e80488>
               replace: 
               input_width: 5
               column: anz_c_vdi3492
               colspan_max: 1
               before: 
               field_type: string
               rowspan: {...} (14)
               container: <ImplicitAcquisitionWrapper B18-0011 at 0x118e8ce10>
               suid: 
               wrapped_repeat: <SafeMapping - at 0x1186c10a8>
               traverse_subpath: <list - at 0x1187383f8>
               field: 
               template: <ViewPageTemplateFile - at 0x1179ca8d0>
               review_state: <list - at 0x11850fef0>
               translate: <function translate at 0x11872cc80>
               klass: empty
               tabindex: <generator tabindex at 0x1185c3d70>
               repeat: {...} (0)
               rowspan_max: {...} (14)
               views: <ViewMapper - at 0x118736710>
               args: <tuple - at 0x108e2fe50>
               here: <ImplicitAcquisitionWrapper B18-0011 at 0x118e8ce10>
               input_class: numeric
               portal: <ImplicitAcquisitionWrapper senaite at 0x11673b6e0>
               user: <ImplicitAcquisitionWrapper - at 0x10913ccd0>
               table_row_class: 
               nothing: <NoneType - at 0x108071e08>
               after: 
               dummy: <NoneType - at 0x108071e08>
               nr_cols: 15
               keyword: 
               default: <object - at 0x108155bf0>
               modules: <instance - at 0x10925f830>
               item: {...} (26)
               t: {...} (5)
               context: <ImplicitAcquisitionWrapper B18-0011 at 0x118e8ce10>
               target_language: <NoneType - at 0x108071e08>
               root: <ImplicitAcquisitionWrapper Zope at 0x1162c2b40>
               options: {...} (0)
               loop: {...} (3)
               view: <BikaListingTable - at 0x108e2f850>

from senaite.core.

ramonski avatar ramonski commented on June 21, 2024

Ok, also the latest upgrade step fails for this installation, which seem to be related to the second Traceback, but not to the one with the encoding:

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 Products.CMFCore.FSPythonScript, line 127, in __call__
  Module Shared.DC.Scripts.Bindings, line 322, in __call__
  Module Shared.DC.Scripts.Bindings, line 359, in _bindAndExec
  Module Products.PythonScripts.PythonScript, line 344, in _exec
  Module script, line 11, in prefs_reinstallProducts
   - <FSPythonScript at /senaite/portal_quickinstaller/prefs_reinstallProducts>
   - Line 11
  Module Products.CMFPlone.QuickInstallerTool, line 100, in upgradeProduct
  Module Products.GenericSetup.upgrade, line 166, in doStep
  Module bika.lims.upgrade, line 55, in wrap_func_args
  Module bika.lims.upgrade.v01_02_008, line 43, in upgrade
  Module bika.lims.upgrade.v01_02_008, line 116, in revert_client_permissions_for_batches
AttributeError: allowedRolesAndUsers

from senaite.core.

grulisco avatar grulisco commented on June 21, 2024

Didn't encounter this issue again with version 1.2.9

from senaite.core.

ramonski avatar ramonski commented on June 21, 2024

Ok, it seems to me also like an issue with the data rather than with the code. Please re-open if the issue occurs with new Batches in 1.3.0 @grulisco

from senaite.core.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.