Ad
  • Custom User Avatar

    updated. Should be good now.

    Don't forget to copy your code and then reset the trainer.

  • Custom User Avatar

    most likely means that your function is returning None in some cases (when it shouldn't), and that the testing function should be updated to handle that more gracefully.

  • Custom User Avatar

    If you Google (other search engines are available, this is not an endorsement) the exact phrase: "TypeError: 'NoneType' object is not subscriptable" you will find the answer to your question.

    Basically you are trying to are trying to access the index of something that has a None value; check the first few Google results to see how this can happen.

    If you want to troubleshoot you can add a print statement print(my_variable) for the different steps of your code to see where a None value is getting returned.