dictionary key error, list index out of range

I have a class, which has a list and an index.
When a discord server wants to put in an audio file play request, the 3 parameters are put into a list object, that is appended to the request list.
the server name (ctx.guild.name), the event that is happening on the server which in this case is a file, and the audio file to play.
I send the request list to a function to run through requests and play audio. However, whenever I try to refer to the server in my dictionary of servers, it says list index out of range. But I know this isn't the case, because right after I refer to the server, I have lucia speak a message telling me the current request number and each of the 3 parameters. So why can I reference the server name, but when I try to reference it in the dictionary of servers, it gives a list index out of range error?
I've used, server= data[ctx.guild.name] plenty of times. So now why is it all of a sudden not liking that?
The line reads as follows:
server= data[request.list[request.index][0]]
data is the dictionary of servers. Request is the class that stores the list of requests and the index.
The 0 is the server name (ctx.guild.name), 1 is the event, and 2 is audio file name.
Why is it getting upset about this? Even more odd, why can I still reference it, just not in a dictionary?

-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector
  • ... AudioGames . net Forum — Developers room : Zarvox via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Turret via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Zarvox via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Zarvox via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Ethin via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Ethin via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Ethin via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Zarvox via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Zarvox via Audiogames-reflector

Reply via email to