Hello, I finished the task on my replit that basically tells me to write python code that generates ‘bar’ graph and correlation matrix images using pandas and seaborn. While running the test_module.py, 2 errors were raised based on the former image result. Though the resulting ‘catplot.png’ and ‘Figure_1.png’ are very similar, if not exactly alike, I expect the errors are negligible in this case. My interpretation of the cause of the error is that the way my program is written doesn’t match the expected program.
The console response was this:
> python main.py
Matplotlib created a temporary config/cache directory at /tmp/matplotlib-gzcfs1m1 because the default path (/config/matplotlib) is not a writable directory; it is highly recommended to set the MPLCONFIGDIR environment variable to a writable directory, in particular to speed up the import of Matplotlib and to better support multiprocessing.
EE.[‘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’]
.
======================================================================
ERROR: test_bar_plot_number_of_bars (test_module.CatPlotTestCase)Traceback (most recent call last):
File “/home/runner/boilerplate-medical-data-visualizer/test_module.py”, line 26, in test_bar_plot_number_of_bars
actual = len([rect for rect in self.ax.get_children() if isinstance(rect, mpl.patches.Rectangle)])
AttributeError: ‘numpy.ndarray’ object has no attribute ‘get_children’======================================================================
ERROR: test_line_plot_labels (test_module.CatPlotTestCase)Traceback (most recent call last):
File “/home/runner/boilerplate-medical-data-visualizer/test_module.py”, line 13, in test_line_plot_labels
actual = self.ax.get_xlabel()
AttributeError: ‘numpy.ndarray’ object has no attribute ‘get_xlabel’
Ran 4 tests in 6.373s
FAILED (errors=2)
This is the catplot.png: