Uploaded image for project: 'LIMS'
  1. LIMS
  2. LIMS-1523

Simplejson encoder error. Was: Site Error when trying to receive a sample from AR Manage Analyses or Log tabs

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 3.1.5, 3.1.8
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Sprint:
      Aug 2015

      Description

      Works from the View tab and AR lists

        Activity

        Hide
        lemoene lemoene added a comment - - edited

        Exception Details

        Time
            Dec 10, 2014 12:37 PM
        User Name
            labman2 (labman2)
        Request URL
            http://demo.bikalabs.com/@@API/read
        Exception Type
            UnicodeDecodeError
        Exception Value
            'utf8' codec can't decode byte 0x89 in position 0: invalid start byte
        
        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 plone.jsonapi.core.browser.decorators, line 52, in decorator
            Module simplejson, line 321, in dumps
            Module simplejson.encoder, line 237, in encode
            Module simplejson.encoder, line 311, in iterencode
        
        UnicodeDecodeError: 'utf8' codec can't decode byte 0x89 in position 0: invalid start byte
        
        Display traceback as text
        REQUEST
        form
        catalog_name	'bika_setup_catalog'
        page_size	'0'
        cookies
        __utmz	'76775686.1413383632.1.1.utmccn=(direct)|utmcsr=(direct)|utmcmd=(none)'
        toggle_cols	'{"Clientanalysisrequests":["Priority","getDateSampled","state_title","BatchID","SamplingDate","Creator","getSampler","getSampleTypeTitle","getRequestID","getClientSampleID","getAnalysesNum"],"AnalysisRequestsFolderanalysisrequests":["Priority","BatchID","getClientReference","getSample","SubGroup","getClientOrderNumber","Client","Creator","getSampleTypeTitle","getRequestID","getClientSampleID","getDatePublished","getDateReceived","getDateReceived","ClientContact","getDateReceived"]}'
        _ga	'GA1.2.902523019.1413383632'
        __ac	'nx+WjaOchjIWBND68OsU1h/Ovswjn9hau2C/KRXLt+k1NDg4MWQ5M2xhYm1hbjIh'
        _arpv	'http://demo.bikalabs.com/clients/client14-22/AP14-012-R2'
        __utma	'76775686.902523019.1413383632.1413383632.1413397285.2'
        lazy items
        SESSION	<bound method SessionDataManager.getSessionData of <SessionDataManager at /session_data_manager>>
        other
        catalog_name	'bika_setup_catalog'
        AUTHENTICATION_PATH	'Plone/virtual_hosting//'
        TraversalRequestNameStack	[]
        LANGUAGE	'en-us'
        AUTHENTICATED_USER	<PloneUser 'labman2'>
        URL	'http://demo.bikalabs.com/@@API/read'
        VirtualRootPhysicalPath	('', 'Plone')
        _c_authenticatedUser	<PloneUser 'labman2'>
        VIRTUAL_URL	'http://demo.bikalabs.com/@@API/read'
        SERVER_URL	'http://demo.bikalabs.com'
        LANGUAGE_TOOL	<Products.PloneLanguageTool.LanguageTool.LanguageBinding instance at 0xf4d62d8>
        __ac	'nx+WjaOchjIWBND68OsU1h/Ovswjn9hau2C/KRXLt+k1NDg4MWQ5M2xhYm1hbjIh'
        page_size	'0'
        PUBLISHED	<Products.Five.metaclass.API object at 0x20565cd0>
        method	'POST'
        ACTUAL_URL	'http://demo.bikalabs.com/@@API/read'
        VIRTUAL_URL_PARTS	('http://demo.bikalabs.com', '@@API/read')
        URL0	http://demo.bikalabs.com/@@API/read
        URL1	http://demo.bikalabs.com/@@API
        URL2	http://demo.bikalabs.com
        BASE0	http://demo.bikalabs.com
        BASE1	http://demo.bikalabs.com
        BASE2	http://demo.bikalabs.com/@@API
        BASE3	http://demo.bikalabs.com/@@API/read
        environ
        HTTP_COOKIE	'__utmz=76775686.1413383632.1.1.utmccn=(direct)|utmcsr=(direct)|utmcmd=(none); __utma=76775686.902523019.1413383632.1413383632.1413397285.2; _ga=GA1.2.902523019.1413383632; toggle_cols=%7B%22Clientanalysisrequests%22%3A%5B%22Priority%22%2C%22getDateSampled%22%2C%22state_title%22%2C%22BatchID%22%2C%22SamplingDate%22%2C%22Creator%22%2C%22getSampler%22%2C%22getSampleTypeTitle%22%2C%22getRequestID%22%2C%22getClientSampleID%22%2C%22getAnalysesNum%22%5D%2C%22AnalysisRequestsFolderanalysisrequests%22%3A%5B%22Priority%22%2C%22BatchID%22%2C%22getClientReference%22%2C%22getSample%22%2C%22SubGroup%22%2C%22getClientOrderNumber%22%2C%22Client%22%2C%22Creator%22%2C%22getSampleTypeTitle%22%2C%22getRequestID%22%2C%22getClientSampleID%22%2C%22getDatePublished%22%2C%22getDateReceived%22%2C%22getDateReceived%22%2C%22ClientContact%22%2C%22getDateReceived%22%5D%7D; __ac="nx%2BWjaOchjIWBND68OsU1h/Ovswjn9hau2C/KRXLt%2Bk1NDg4MWQ5M2xhYm1hbjIh"; _arpv=http://demo.bikalabs.com/clients/client14-22/AP14-012-R2'
        SERVER_SOFTWARE	'Zope/(2.13.21, python 2.7.5, linux2) ZServer/1.1'
        SCRIPT_NAME	''
        REQUEST_METHOD	'POST'
        PATH_INFO	'/VirtualHostBase/http/demo.bikalabs.com:80/Plone/VirtualHostRoot/@@API/read'
        HTTP_ORIGIN	'http://demo.bikalabs.com'
        SERVER_PROTOCOL	'HTTP/1.0'
        QUERY_STRING	''
        channel.creation_time	1418207831
        HTTP_X_REAL_IP	'105.236.247.17'
        CONTENT_LENGTH	'43'
        HTTP_USER_AGENT	'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/39.0.2171.65 Chrome/39.0.2171.65 Safari/537.36'
        HTTP_REFERER	'http://demo.bikalabs.com/clients/client-1/portal_factory/AnalysisRequest/Request%20new%20analyses/ar_add'
        SERVER_NAME	'D1.bikalabs.com'
        REMOTE_ADDR	'127.0.0.1'
        PATH_TRANSLATED	'/VirtualHostBase/http/demo.bikalabs.com:80/Plone/VirtualHostRoot/@@API/read'
        SERVER_PORT	'8095'
        HTTP_X_REQUESTED_WITH	'XMLHttpRequest'
        HTTP_X_FORWARDED_PROTO	'http'
        HTTP_HOST	'demo.bikalabs.com'
        HTTP_X_VARNISH	'1663741261'
        HTTP_ACCEPT	'application/json, text/javascript, */*; q=0.01'
        GATEWAY_INTERFACE	'CGI/1.1'
        HTTP_X_FORWARDED_FOR	'105.236.247.17'
        HTTP_ACCEPT_LANGUAGE	'en-US,en;q=0.8'
        CONTENT_TYPE	'application/x-www-form-urlencoded; charset=UTF-8'
        HTTP_ACCEPT_ENCODING	'gzip, deflate'
        
        Show
        lemoene lemoene added a comment - - edited Exception Details Time Dec 10, 2014 12:37 PM User Name labman2 (labman2) Request URL http://demo.bikalabs.com/@@API/read Exception Type UnicodeDecodeError Exception Value 'utf8' codec can't decode byte 0x89 in position 0: invalid start byte 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 plone.jsonapi.core.browser.decorators, line 52, in decorator Module simplejson, line 321, in dumps Module simplejson.encoder, line 237, in encode Module simplejson.encoder, line 311, in iterencode UnicodeDecodeError: 'utf8' codec can't decode byte 0x89 in position 0: invalid start byte Display traceback as text REQUEST form catalog_name 'bika_setup_catalog' page_size '0' cookies __utmz '76775686.1413383632.1.1.utmccn=(direct)|utmcsr=(direct)|utmcmd=(none)' toggle_cols '{"Clientanalysisrequests":["Priority","getDateSampled","state_title","BatchID","SamplingDate","Creator","getSampler","getSampleTypeTitle","getRequestID","getClientSampleID","getAnalysesNum"],"AnalysisRequestsFolderanalysisrequests":["Priority","BatchID","getClientReference","getSample","SubGroup","getClientOrderNumber","Client","Creator","getSampleTypeTitle","getRequestID","getClientSampleID","getDatePublished","getDateReceived","getDateReceived","ClientContact","getDateReceived"]}' _ga 'GA1.2.902523019.1413383632' __ac 'nx+WjaOchjIWBND68OsU1h/Ovswjn9hau2C/KRXLt+k1NDg4MWQ5M2xhYm1hbjIh' _arpv 'http://demo.bikalabs.com/clients/client14-22/AP14-012-R2' __utma '76775686.902523019.1413383632.1413383632.1413397285.2' lazy items SESSION <bound method SessionDataManager.getSessionData of <SessionDataManager at /session_data_manager>> other catalog_name 'bika_setup_catalog' AUTHENTICATION_PATH 'Plone/virtual_hosting//' TraversalRequestNameStack [] LANGUAGE 'en-us' AUTHENTICATED_USER <PloneUser 'labman2'> URL 'http://demo.bikalabs.com/@@API/read' VirtualRootPhysicalPath ('', 'Plone') _c_authenticatedUser <PloneUser 'labman2'> VIRTUAL_URL 'http://demo.bikalabs.com/@@API/read' SERVER_URL 'http://demo.bikalabs.com' LANGUAGE_TOOL <Products.PloneLanguageTool.LanguageTool.LanguageBinding instance at 0xf4d62d8> __ac 'nx+WjaOchjIWBND68OsU1h/Ovswjn9hau2C/KRXLt+k1NDg4MWQ5M2xhYm1hbjIh' page_size '0' PUBLISHED <Products.Five.metaclass.API object at 0x20565cd0> method 'POST' ACTUAL_URL 'http://demo.bikalabs.com/@@API/read' VIRTUAL_URL_PARTS ('http://demo.bikalabs.com', '@@API/read') URL0 http://demo.bikalabs.com/@@API/read URL1 http://demo.bikalabs.com/@@API URL2 http://demo.bikalabs.com BASE0 http://demo.bikalabs.com BASE1 http://demo.bikalabs.com BASE2 http://demo.bikalabs.com/@@API BASE3 http://demo.bikalabs.com/@@API/read environ HTTP_COOKIE '__utmz=76775686.1413383632.1.1.utmccn=(direct)|utmcsr=(direct)|utmcmd=(none); __utma=76775686.902523019.1413383632.1413383632.1413397285.2; _ga=GA1.2.902523019.1413383632; toggle_cols=%7B%22Clientanalysisrequests%22%3A%5B%22Priority%22%2C%22getDateSampled%22%2C%22state_title%22%2C%22BatchID%22%2C%22SamplingDate%22%2C%22Creator%22%2C%22getSampler%22%2C%22getSampleTypeTitle%22%2C%22getRequestID%22%2C%22getClientSampleID%22%2C%22getAnalysesNum%22%5D%2C%22AnalysisRequestsFolderanalysisrequests%22%3A%5B%22Priority%22%2C%22BatchID%22%2C%22getClientReference%22%2C%22getSample%22%2C%22SubGroup%22%2C%22getClientOrderNumber%22%2C%22Client%22%2C%22Creator%22%2C%22getSampleTypeTitle%22%2C%22getRequestID%22%2C%22getClientSampleID%22%2C%22getDatePublished%22%2C%22getDateReceived%22%2C%22getDateReceived%22%2C%22ClientContact%22%2C%22getDateReceived%22%5D%7D; __ac="nx%2BWjaOchjIWBND68OsU1h/Ovswjn9hau2C/KRXLt%2Bk1NDg4MWQ5M2xhYm1hbjIh"; _arpv=http://demo.bikalabs.com/clients/client14-22/AP14-012-R2' SERVER_SOFTWARE 'Zope/(2.13.21, python 2.7.5, linux2) ZServer/1.1' SCRIPT_NAME '' REQUEST_METHOD 'POST' PATH_INFO '/VirtualHostBase/http/demo.bikalabs.com:80/Plone/VirtualHostRoot/@@API/read' HTTP_ORIGIN 'http://demo.bikalabs.com' SERVER_PROTOCOL 'HTTP/1.0' QUERY_STRING '' channel.creation_time 1418207831 HTTP_X_REAL_IP '105.236.247.17' CONTENT_LENGTH '43' HTTP_USER_AGENT 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/39.0.2171.65 Chrome/39.0.2171.65 Safari/537.36' HTTP_REFERER 'http://demo.bikalabs.com/clients/client-1/portal_factory/AnalysisRequest/Request%20new%20analyses/ar_add' SERVER_NAME 'D1.bikalabs.com' REMOTE_ADDR '127.0.0.1' PATH_TRANSLATED '/VirtualHostBase/http/demo.bikalabs.com:80/Plone/VirtualHostRoot/@@API/read' SERVER_PORT '8095' HTTP_X_REQUESTED_WITH 'XMLHttpRequest' HTTP_X_FORWARDED_PROTO 'http' HTTP_HOST 'demo.bikalabs.com' HTTP_X_VARNISH '1663741261' HTTP_ACCEPT 'application/json, text/javascript, */*; q=0.01' GATEWAY_INTERFACE 'CGI/1.1' HTTP_X_FORWARDED_FOR '105.236.247.17' HTTP_ACCEPT_LANGUAGE 'en-US,en;q=0.8' CONTENT_TYPE 'application/x-www-form-urlencoded; charset=UTF-8' HTTP_ACCEPT_ENCODING 'gzip, deflate'
        Hide
        xispa Jordi (Inactive) added a comment -

        Bump

        Same happens in worksheet's manage results, when the user changes the method from the selection list that appears when the analysis has a method assigned. Once the method is selected, the system tries to retrieve the instruments associated to that method to display them to the Instruments column. Since the method cannot be retrieved due to this error, the expected functionality of IMM is broken.

        I haven't look in detail, but I've tried with simplejson 3.8.0 and the error persists.

        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 plone.jsonapi.core.browser.api, line 64, in __call__
            Module plone.jsonapi.core.browser.decorators, line 48, in decorator
            Module simplejson, line 380, in dumps
            Module simplejson.encoder, line 275, in encode
            Module simplejson.encoder, line 357, in iterencode
        
        UnicodeDecodeError: 'utf8' codec can't decode byte 0xb5 in position 11: invalid start byte
        
        Show
        xispa Jordi (Inactive) added a comment - Bump Same happens in worksheet's manage results, when the user changes the method from the selection list that appears when the analysis has a method assigned. Once the method is selected, the system tries to retrieve the instruments associated to that method to display them to the Instruments column. Since the method cannot be retrieved due to this error, the expected functionality of IMM is broken. I haven't look in detail, but I've tried with simplejson 3.8.0 and the error persists. 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 plone.jsonapi.core.browser.api, line 64, in __call__ Module plone.jsonapi.core.browser.decorators, line 48, in decorator Module simplejson, line 380, in dumps Module simplejson.encoder, line 275, in encode Module simplejson.encoder, line 357, in iterencode UnicodeDecodeError: 'utf8' codec can't decode byte 0xb5 in position 11: invalid start byte
        Hide
        rockfruit Campbell added a comment -

        Refactored the URL-rewriting done when AR transitions are fired from Plone contentmenu workflow actions.

        TODO This should be using content_status_modify! modifying the href is silly. All the WorkflowAction instances are a little redundant - this stuff should all be handled with workflow-before and workflow-after events (if possible), but that's another issue for another day

        Show
        rockfruit Campbell added a comment - Refactored the URL-rewriting done when AR transitions are fired from Plone contentmenu workflow actions. TODO This should be using content_status_modify! modifying the href is silly. All the WorkflowAction instances are a little redundant - this stuff should all be handled with workflow-before and workflow-after events (if possible), but that's another issue for another day

          People

          • Assignee:
            rockfruit Campbell
            Reporter:
            lemoene lemoene
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - Not Specified
              Not Specified
              Remaining:
              Remaining Estimate - 0 minutes
              0m
              Logged:
              Time Spent - 2 hours
              2h

                Agile