Medical Data Visualizer Issues Running

Tell us what’s happening:
Nothing is running. The last two tests worked fine, but every time I try to run this one, I am given countless errors without even doing anything and I can’t figure why.

Your code so far
As soon as I run the code this is what pops up in the console

 Matplotlib created a temporary config/cache directory at /tmp/matplotlib- 
 6c3z60kj 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.
Traceback (most recent call last):
  File "", line 2, in <module>
    import medical_data_visualizer
   File "/home/runner/boilerplate-medical-data- 
 visualizer/", line 10, in <module>
    df['overweight'] = None
TypeError: 'NoneType' object does not support item assignment
exit status 1

Your browser information:

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

Challenge: Medical Data Visualizer

Link to the challenge:

Please link to your project so someone can look at what might cause that issue.’

Sorry for the late reply. Here’s the link, thank you in advance. I’ve tried running the next project too, and same issue

The linked project is just the boilerplate without any code by you.
That code is not a working project, but merely a starting point for you to add your own code.

The error in question happens because df=None, meaning df is a None-object. Those have no operations defined on them, then the line df["overweight"]= None throws the error because this line assigns a value to the None-object (value is None), but assignment is not defined on it.

I assume the same issue is with the next project. The boilerplate is not designed to run until you add your code.
You might want to add a generic return right at the start of the functions, so they are at least working, while you add your code.

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