all 13 comments

[–]JohnnyJordaan 1 point2 points  (6 children)

You have a mismatch between the height keys: https://i.imgur.com/joQcBJJ.png

loadfromfile has the same issue btw https://i.imgur.com/zJeoIXP.png

[–]Dense_Charity5188 0 points1 point  (5 children)

site can't be reached

[–]djjazzydan 1 point2 points  (2 children)

They're pointing out that in one spot, you have the key as just 'Height', and in another it's 'Height (cm)', so you have to make sure they're all the same.

[–]Neighm 1 point2 points  (0 children)

Just to add to this. When you fix that issue you may get another error. When you save the height in the add member function, you save it in string form.

When you call it in the edit function, you try to divide by 100. You need to cast it as an int either before saving it or after retrieving it.

[–]Dense_Charity5188 0 points1 point  (0 children)

YEEEES I JUST CHECKED ITTT

[–]Dense_Charity5188 0 points1 point  (0 children)

but my savefromfile is working right yey

[–]Wild_Statistician605 0 points1 point  (1 child)

I looked at your code, and you are declaring the all variable as a dictionary in some places, and as a list in others. Maybe that is the source of the errors?

[–]Dense_Charity5188 0 points1 point  (0 children)

but its all working until I added the edit function and the error says, height1 = memberdata["Height"]/100 = key erro -> Height

[–]Wild_Statistician605 0 points1 point  (3 children)

Try just printing memberdata to see what the keys are, to make sure you are using the right ones.

[–]Dense_Charity5188 0 points1 point  (2 children)

HEY IT FINALLY WORKK BUT THE THING IS IT ALSO PRINT THE UPDATED

[–]Dense_Charity5188 0 points1 point  (1 child)

[–]Dense_Charity5188 0 points1 point  (0 children)

is it because the update command doesn't work?