I’m working on a portfolio project for a basic recommendation software, where I take user inputs and give them a list of recommendations based on those inputs. I’m using a linked list data structure, and I can get part of the program to run. However, I’m currently running into an error that I can’t seem to resolve.
Here is the problem I’m running into:
Traceback (most recent call last):
File "/Users/Kyle_Borzoni/Desktop/Coding/My_Odyssey/my_odyssey.py", line 57, in <module>
if sublist_head.get_value()[0] == selected_odyssey_theme:
~~~~~~~~~~~~~~~~~~~~~~~~^^^
TypeError: 'NoneType' object is not subscriptable
Below is the link to my GitHub repository:
https://github.com/Kyloni417/my_odyssey
As stated earlier, I’m using a linked list data structure, and I want the selected theme to output the list associated with that theme. It’s my understanding that if the selected theme matches the list[0] then it should output all of the list items with the matching input. The second half of the themes seem to work, but the program still errors out when it should be repeating the loop. Any help will be greatly appreciated!
user26449504 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
3