Medical Data Visualizer - Heatmap

Hello! Same error with the heatmap:

Replit: Updating package configuration

--> python3 -m poetry lock --no-update

  TOMLError

  Invalid TOML file /home/runner/boilerplate-medical-data-visualizer/pyproject.toml: Invalid key "poetry update matplotlib" at line 12 col 24

  at venv/lib/python3.8/site-packages/poetry/co
 python main.py
[Text(0.5, 1.0, ''), Text(0.0, 1.0, ''), Text(1.0, 1.0, '')]
..[Text(0.5, 1.0, ''), Text(0.0, 1.0, ''), Text(1.0, 1.0, '')]
/home/runner/boilerplate-medical-data-visualizer/venv/lib/python3.8/site-packages/seaborn/matrix.py:268: PendingDeprecationWarning: 
The label function will be deprecated in a future version. Use Tick.label1 instead.
  fontsize = tick.label.get_size()
.[Text(0.5, 1.0, ''), Text(0.0, 1.0, ''), Text(1.0, 1.0, '')]
['0.0', '0.0', '-0.0', '0.0', '-0.1', '0.5', '0.0', '0.1', '0.1', '0.3', '0.0', '0.0', '0.0', '0.0', '0.0', '0.0', '0.2', '0.1', '0.0', '0.2', '0.1', '0.0', '0.1', '-0.0', '-0.1', '0.1', '0.0', '0.2', '0.0', '0.1', '-0.0', '-0.0', '0.1', '0.0', '0.1', '0.4', '-0.0', '-0.0', '0.3', '0.2', '0.1', '-0.0', '0.0', '0.0', '-0.0', '-0.0', '-0.0', '0.2', '0.1', '0.1', '0.0', '0.0', '0.0', '0.0', '0.3', '0.0', '-0.0', '0.0', '-0.0', '-0.0', '-0.0', '0.0', '0.0', '-0.0', '0.0', '0.0', '0.0', '0.2', '0.0', '-0.0', '0.2', '0.1', '0.3', '0.2', '0.1', '-0.0', '-0.0', '-0.0', '-0.0', '0.1', '-0.1', '-0.1', '0.7', '0.0', '0.2', '0.1', '0.1', '-0.0', '0.0', '-0.0', '0.1', '', '', '']
F
======================================================================
FAIL: test_heat_map_values (test_module.HeatMapTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/runner/boilerplate-medical-data-visualizer/test_module.py", line 48, in test_heat_map_values
    self.assertEqual(actual, expected, "Expected different values in heat map.")
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']

First list contains 3 additional elements.
First extra element 91:
''

  ['0.0',
   '0.0',
   '-0.0',
   '0.0',
   '-0.1',
   '0.5',
   '0.0',
   '0.1',
   '0.1',
   '0.3',
   '0.0',
   '0.0',
   '0.0',
   '0.0',
   '0.0',
   '0.0',
   '0.2',
   '0.1',
   '0.0',
   '0.2',
   '0.1',
   '0.0',
   '0.1',
   '-0.0',
   '-0.1',
   '0.1',
   '0.0',
   '0.2',
   '0.0',
   '0.1',
   '-0.0',
   '-0.0',
   '0.1',
   '0.0',
   '0.1',
   '0.4',
   '-0.0',
   '-0.0',
   '0.3',
   '0.2',
   '0.1',
   '-0.0',
   '0.0',
   '0.0',
   '-0.0',
   '-0.0',
   '-0.0',
   '0.2',
   '0.1',
   '0.1',
   '0.0',
   '0.0',
   '0.0',
   '0.0',
   '0.3',
   '0.0',
   '-0.0',
   '0.0',
   '-0.0',
   '-0.0',
   '-0.0',
   '0.0',
   '0.0',
   '-0.0',
   '0.0',
   '0.0',
   '0.0',
   '0.2',
   '0.0',
   '-0.0',
   '0.2',
   '0.1',
   '0.3',
   '0.2',
   '0.1',
   '-0.0',
   '-0.0',
   '-0.0',
   '-0.0',
   '0.1',
   '-0.1',
   '-0.1',
   '0.7',
   '0.0',
   '0.2',
   '0.1',
   '0.1',
   '-0.0',
   '0.0',
   '-0.0',
-  '0.1',
?       ^

+  '0.1']
?       ^

-  '',
-  '',
-  ''] : Expected different values in heat map.

----------------------------------------------------------------------
Ran 4 tests in 27.058s

FAILED (failures=1)
 

I have also added poetry update matplotlib in the toml file and didn’t work. Here’s my code.
I can see my list contains 3 ‘blank’ additional elements but I don’t know why, I have the same variables…

Your TOMLError is here in pyproject.toml:

[tool]
[tool.poetry]
authors = ["Your Name <you@example.com>"]
name = "root"
version = "0.0.0"
description = ""

[tool.poetry.dependencies]
pandas = ""
python = "^3.7"
seaborn = ""
poetry update matplotlib

The last line is a shell command that must have been added inadvertently. It has to be removed.

The other error is the old wrong version of matplotlib that was fixed a year or so back, but the bad pyproject.toml is blocking its update (updating matplotlib fixes this but there are other problems). Further, it seems impossible to fix the dependencies on a fork of your project, indicating some problem in the repl. My advice would be to fork a new copy of the project boilerplate, copy and paste your code, and then follow the tips in the posts from this summer/fall about the dependency problems in these projects to install up to date versions of the dependencies.

This was kind of curious. As you said, I have removed poetry update matplotlib and tried to change matplotlib version to the most recent which is 3.6.2. Run and it said that I must update Numpy too (from 1.17.4 to 1.19) …

Here is how it looks:

[[package]]
name = "matplotlib"
version = "3.6.2" # Updated (was 3.2.2)
description = "Python plotting package"
category = "main"
optional = false
python-versions = ">=3.7"

[[package]]
name = "numpy"
version = "1.19" # Updated (was 1.17.4)
description = "NumPy is the fundamental package for array computing with Python."
category = "main"
optional = false
python-versions = ">=3.5"

Run again and it works. Thanks Jeremy!

As you said, we must install up to date versions of the dependencies, peace!