Nov-15-2019, 11:36 AM
Below is the error code for the python code for splitting the random song. I messed around with it a little and i think its to do with splitting a variable but im not sure.
Input your usernameBen
Input your passwordTommy_04
well done you logged in Ben
Livin on a Prayer / 12 / Bon Jovi
Traceback (most recent call last):
File "\documents\Desktop\Python\Course_Work.py", line 56, in <module>
main()
File "\documents\Desktop\Python\Course_Work.py", line 52, in main
split_song(songnames)
File "\documents\Desktop\Python\Course_Work.py", line 43, in split_song
for letter in songnames.split(" "):
AttributeError: 'list' object has no attribute 'split'
>>>
Input your usernameBen
Input your passwordTommy_04
well done you logged in Ben
Livin on a Prayer / 12 / Bon Jovi
Traceback (most recent call last):
File "\documents\Desktop\Python\Course_Work.py", line 56, in <module>
main()
File "\documents\Desktop\Python\Course_Work.py", line 52, in main
split_song(songnames)
File "\documents\Desktop\Python\Course_Work.py", line 43, in split_song
for letter in songnames.split(" "):
AttributeError: 'list' object has no attribute 'split'
>>>