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

BUG when try eval the patient data #6

Closed
jonathanf opened this issue May 15, 2013 · 2 comments
Closed

BUG when try eval the patient data #6

jonathanf opened this issue May 15, 2013 · 2 comments

Comments

@jonathanf
Copy link

File "/usr/local/lib/python2.6/dist-packages/pygrowup/pygrowup.py", line 302, in bmifa
sex=
sex, height=height)
File "/usr/local/lib/python2.6/dist-packages/pygrowup/pygrowup.py", line 351, in zscore_for_measurement
zscores = obs.get_zscores(self)
File "/usr/local/lib/python2.6/dist-packages/pygrowup/pygrowup.py", line 67, in get_zscores
table = getattr(growth, table_name)
AttributeError: 'Calculator' object has no attribute 'bmifa_girls_None'

you eval the age in weeks but if you have a value between 13 > 14 you get a error

the is the following:

imc = 32.0
age_in_moths = 3
sex = F
heigth = 50

I resolve the issue converting to integer in:

@Property
def age_in_weeks(self):
return int((self.age * D('30.4374')) / D(7))

i think a exception in line 133 may be a solution.

Regards

ewheeler added a commit that referenced this issue May 16, 2013
also add tests to demonstrate fix
@ewheeler
Copy link
Owner

thanks for creating an issue about this error.

i tracked down the bug and added tests for this condition
i will put a bugfix release on pypi soon

@ewheeler
Copy link
Owner

new version with bugfix is now available on pypi: https://pypi.python.org/pypi/pygrowup/0.7.7b0

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

No branches or pull requests

2 participants