Skip to content

Develop issue97: bug fix#98

Open
xiaoliz0 wants to merge 2 commits intomainfrom
develop_issue97
Open

Develop issue97: bug fix#98
xiaoliz0 wants to merge 2 commits intomainfrom
develop_issue97

Conversation

@xiaoliz0
Copy link
Contributor

Bug fix: PRONTO will crash when the "Gender" information is missing in MTF file.

@marrip
Copy link
Collaborator

marrip commented Jan 29, 2026

I didn't find time to look through this yet. Is it super urgent or can we try fix the other PR first?

@xiaoliz0
Copy link
Contributor Author

I didn't find time to look through this yet. Is it super urgent or can we try fix the other PR first?

This currently only affects OUS. It is urgent for us since it is a bug. But I have fixed it locally in our side. So I think we could deal it before next newer version of PRONTO published. :)

@marrip
Copy link
Collaborator

marrip commented Feb 2, 2026

yes, I thought we do it directly after we have fixed the other PR 👍

Comment on lines +336 to +338
gender = str(sheet_material.cell_value(r+2,c))
if(gender != "" and gender != "X"):
ipd_gender = gender[0]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what exactly is happening here, we check if the column is Gender and then we extract the value from 2 rows down. We check if the value is not empty string and not Xand only then we assign it to ipd_gender. But I don't get why gender at index 0 (is gender a list?). Also it seems that ipd_gender is already empty string why check if gender is empty string if this would actually not change anything?

tf11.paragraphs[0].font.size = Pt(10)
tf11.paragraphs[0].alignment = PP_ALIGN.LEFT
gender_age = gender + '/' + age + 'y'
gender_age = ipd_gender + '/' + age + 'y'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
gender_age = ipd_gender + '/' + age + 'y'
gender_age = "{}/{}y'.format(ipd_gender, age)

Copy link
Collaborator

@marrip marrip left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a question about how you handle gender assignment and would suggest to use a format string. Other than that, I think this looks good 👍

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

Successfully merging this pull request may close these issues.

Bug report: PRONTO will crash when the "Gender" information is missing in MTF file.

2 participants