Data Analysis with Python Projects - Medical Data Visualizer

Tell us what’s happening:
I can’t get the heatmap , it creates the image file but without any annotation. It retireves an empty list so i recieve the following error.

Traceback (most recent call last):
File “/home/runner/boilerplate-medical-data-visualizer/test_module.py”, line 47, in test_heat_map_values
self.assertEqual(actual, expected, “Expected different values in heat map.”)
AssertionError: Lists differ: [‘–’, ‘–’, ‘–’, ‘–’, ‘–’, ‘–’, ‘–’, [36 chars]‘–’] != [‘0.0’, ‘0.0’, ‘-0.0’, ‘0.0’, ‘-0.1’, ‘0.5’[615 chars]0.1’]

First differing element 0:
‘–’
‘0.0’

Second list contains 77 additional elements.
First extra element 14:
‘0.0’

Diff is 1062 characters long. Set self.maxDiff to None to see it. : Expected different values in heat map.

Your code so far

Traceback (most recent call last):
  File "/home/runner/boilerplate-medical-data-visualizer/test_module.py", line 47, in test_heat_map_values
    self.assertEqual(actual, expected, "Expected different values in heat map.")
AssertionError: Lists differ: ['--', '--', '--', '--', '--', '--', '--', [36 chars]'--'] != ['0.0', '0.0', '-0.0', '0.0', '-0.1', '0.5'[615 chars]0.1']

First differing element 0:
'--'
'0.0'

Second list contains 77 additional elements.
First extra element 14:
'0.0'

Diff is 1062 characters long. Set self.maxDiff to None to see it. : Expected different values in heat map.

When i try it in a jupyter notebook it works fine.

This is the link to the replit project.

Thanks a lot

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36

Challenge: Data Analysis with Python Projects - Medical Data Visualizer

Link to the challenge:

I think there’s something wrong with your replit. I would fork it from the boilerplate again and copy your code back in. Here it is: fcc-medical-data-visualizer - Replit

Had the same problem here:

Better yet, fork the boilerplate from here: https://replit.com/@pkdvalis/fcc-2023-Boilerplate-medical-data-visualizer

This version has a fix for the test script.

1 Like

Thank you so much, it’s now working.

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.