Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calculation referring to additional python module not triggered #408

Closed
grulisco opened this issue Nov 25, 2017 · 3 comments
Closed

Calculation referring to additional python module not triggered #408

grulisco opened this issue Nov 25, 2017 · 3 comments

Comments

@grulisco
Copy link
Contributor

Steps to reproduce

Create a calculation that refers to a self-defined function within an additional python module,
based on e.g. 2 interim fields.
The calculation is verified by the test parameters and test results.
Assign one AS to this calculation.
Create an AR with this AS.

(@ramonski: look at calculation "Test Python Calcs", service "Test-Analysenservice 1" on our testserver)

Current behavior

When entering interim fields in AR results view the calculation is not triggered.

Expected behavior

The result shall be calculated.

@grulisco
Copy link
Contributor Author

Just noticed corresponding errors in plone setup:

NameError: name 'floor' is not defined
NameError: name 'poisson95_og' is not defined

It seems that the needed python libraries (e.g. math) are not imported correctly for the real calculations.

@grulisco
Copy link
Contributor Author

Another calculation fails, that contains strings and IF ... ELSE as part of the expression. It worked before and it still works in the calculation test view.
Might be a related to this issue...

@ramonski ramonski self-assigned this Dec 7, 2017
@ramonski
Copy link
Contributor

ramonski commented Dec 8, 2017

Traceback

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.calcs, line 394, in __call__
  Module bika.lims.browser.calcs, line 218, in calculate
  Module bika.lims.browser.calcs, line 1, in <module>
NameError: name 'floor' is not defined

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants