Dear community,
when hitting the “print” button from a created worksheet that has 4 samples assigned, the following error occurs:
WS-001 - Unable to load the template ‘ar_by_column.pt’:
Traceback (most recent call last):
File “/home/senaite/buildout-cache/eggs/senaite.core-1.3.1-py2.7.egg/bika/lims/browser/worksheet/views/printview.py”, line 143, in renderWSTemplate
reptemplate = embed(self)
File “/home/senaite/buildout-cache/eggs/Zope2-2.13.28-py2.7.egg/Products/Five/browser/pagetemplatefile.py”, line 59, in call
sourceAnnotations=getattr(debug_flags, ‘sourceAnnotations’, 0),
File “/home/senaite/buildout-cache/eggs/zope.pagetemplate-3.6.3-py2.7.egg/zope/pagetemplate/pagetemplate.py”, line 132, in pt_render
strictinsert=0, sourceAnnotations=sourceAnnotations
File “/home/senaite/buildout-cache/eggs/five.pt-2.2.4-py2.7.egg/five/pt/engine.py”, line 98, in call
return self.template.render(**kwargs)
File “/home/senaite/buildout-cache/eggs/z3c.pt-3.2.0-py2.7.egg/z3c/pt/pagetemplate.py”, line 173, in render
return base_renderer(context)
File “/home/senaite/buildout-cache/eggs/Chameleon-3.6.2-py2.7.egg/chameleon/zpt/template.py”, line 306, in render
return super(PageTemplate, self).render(_kw)
File “/home/senaite/buildout-cache/eggs/Chameleon-3.6.2-py2.7.egg/chameleon/template.py”, line 209, in render
raise_with_traceback(exc, tb)
File “/home/senaite/buildout-cache/eggs/Chameleon-3.6.2-py2.7.egg/chameleon/template.py”, line 187, in render
self._render(stream, econtext, rcontext)
File “bc6147be19d9d4a62da071e4b4e4f4b8.py”, line 119, in render
File “/home/senaite/buildout-cache/eggs/senaite.core-1.3.1-py2.7.egg/bika/lims/browser/worksheet/views/printview.py”, line 190, in getWorksheet
ws = self._ws_data(self._worksheets[self._current_ws_index])
File “/home/senaite/buildout-cache/eggs/senaite.core-1.3.1-py2.7.egg/bika/lims/browser/worksheet/views/printview.py”, line 253, in _ws_data
data[‘ars’] = self._analyses_data(ws)
File “/home/senaite/buildout-cache/eggs/senaite.core-1.3.1-py2.7.egg/bika/lims/browser/worksheet/views/printview.py”, line 375, in _analyses_data
ar[‘sample’] = self._sample_data(an.getRequest())
AttributeError: getRequest
But as soon as I add a reference sample (QC sample), I get the error again:
WS-002 - Unable to load the template ‘ar_by_column.pt’:
Traceback (most recent call last):
File “/home/senaite/senaitelims/src/senaite.core/bika/lims/browser/worksheet/views/printview.py”, line 143, in renderWSTemplate
reptemplate = embed(self)
File “/home/senaite/buildout-cache/eggs/Zope2-2.13.29-py2.7.egg/Products/Five/browser/pagetemplatefile.py”, line 59, in call
sourceAnnotations=getattr(debug_flags, ‘sourceAnnotations’, 0),
File “/home/senaite/buildout-cache/eggs/zope.pagetemplate-3.6.3-py2.7.egg/zope/pagetemplate/pagetemplate.py”, line 132, in pt_render
strictinsert=0, sourceAnnotations=sourceAnnotations
File “/home/senaite/buildout-cache/eggs/five.pt-2.2.4-py2.7.egg/five/pt/engine.py”, line 98, in call
return self.template.render(**kwargs)
File “/home/senaite/buildout-cache/eggs/z3c.pt-3.2.0-py2.7.egg/z3c/pt/pagetemplate.py”, line 173, in render
return base_renderer(context)
File “/home/senaite/buildout-cache/eggs/Chameleon-3.6.2-py2.7.egg/chameleon/zpt/template.py”, line 306, in render
return super(PageTemplate, self).render(_kw)
File “/home/senaite/buildout-cache/eggs/Chameleon-3.6.2-py2.7.egg/chameleon/template.py”, line 209, in render
raise_with_traceback(exc, tb)
File “/home/senaite/buildout-cache/eggs/Chameleon-3.6.2-py2.7.egg/chameleon/template.py”, line 187, in render
self._render(stream, econtext, rcontext)
File “59a85fb829b45b5be2800253707bd225.py”, line 119, in render
File “/home/senaite/senaitelims/src/senaite.core/bika/lims/browser/worksheet/views/printview.py”, line 190, in getWorksheet
ws = self._ws_data(self._worksheets[self._current_ws_index])
File “/home/senaite/senaitelims/src/senaite.core/bika/lims/browser/worksheet/views/printview.py”, line 253, in _ws_data
data[‘ars’] = self._analyses_data(ws)
File “/home/senaite/senaitelims/src/senaite.core/bika/lims/browser/worksheet/views/printview.py”, line 375, in _analyses_data
ar[‘sample’] = self._sample_data(an.getRequest())
AttributeError: getRequest