An integer is required (got type str) (demographic data visualizer)

Tell us what’s happening:
I’ve got all the numbers to come out just fine, but my issue is that when I run the tests, both the tests for people who are higher and lower education rich return the following error:

an integer is required (got type str)

This occurs despite the fact that I have the correct number printed (I believe printed as a float, since it returns with one decimal place). Whats more is if I use the int() function I get the error that my answer is wrong, as it removes the decimal place.

I can’t tell if this is an error in the test or something I’m doing wrong. Even when I look at the test file it has a decimal, so I don’t see how it is expecting an int.

Your code so far
You may need to type
“poetry install”
into the console before anything will run. (This is another problem where repl is not remembering the dependancies)

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36.

Challenge: Demographic Data Analyzer

Link to the challenge:

Um, yes and no. There’s error in test suite, which causes this error - call to assertAlmostEqual method in tests as a third argument is having the error message, while the third parameter for this method is number of places up to which comparing should be done and the error message is fourth. This is why there is complaining about str and not int.

This error however will not be triggered if the results for these two questions will be matching expected values from the tests.