FCC Medical Data Visualizer: Heat Map

For the Heat map part, i have done all of it and the result looks exactly the same as the required Heat map. But the test module “test_heat_map_values” fails and says I do not have 3 empty strings.

AssertionError: Lists differ: ['0.0[607 chars] ‘0.2’, ‘0.1’, ‘0.1’, ‘-0.0’, ‘0.0’, ‘-0.0’, ‘0.1’] != ['0.0[607 chars] ‘0.2’, ‘0.1’, ‘0.1’, ‘-0.0’, ‘0.0’, ‘-0.0’, ‘0.1’, ‘’, ‘’, ‘’]

Your code so far
please see repl.it

Your browser information:

Challenge: Medical Data Visualizer

Link to the challenge:

I am experiencing the same but when I run the setup on my local machine the test runs fine and the actual output includes ["", “”, “”] the empty items too. Maybe this is a version error or something?

Turns out it indeed was version error. Update the poetry.lock Matplotlib package to install version “3.1.3” instead of “3.3.0” and program worked passing the test.

Apparently the updated version of the matplotlib does not read empty string as text?

1 Like

Keep getting this error when tyring to change the version to 3.1.3 or 3. 2.2
Because fcc-medical-data-visualizer depends on matplotlib (^3.3.0) which doesn’t match any versions, version solving failed.
exit status 1”

I am having the same problem. Updating the version of mpl on poetry doesn’t fix it.
Any advice?

As far as i can tell, theres no way to fix it to work in repit. Instead edit the test module file and remove the extra 3 ’ “” “” “” ’ from the file. Then run the test.

You have to also update the dependency information in the pyproject.toml file. It lists matplotlib’s dependency. You need to change it to:
matplotlib = “^3.1.3”

This will allow you to successfully update the matplotlib version in the poetry.lock file to:
category = “main”
description = “Python plotting package”
name = “matplotlib”
optional = false
python-versions = “>=3.6”
version = “3.1.3”

I think this is the easiest and faster way to solve the problem, thank you.