Closed CocoaCrispies closed 3 years ago
Hi CocoaCrispies,
I'm afraid your bug report does not give me much pointers to help you.
python3.7/site-packages/discord
, not to python3.7/site-packages/nbt
.piece = nbt['i'].tags[0]['tag']['display']['Name']
. However that line does not occur in your code (which defines a function inventory_data
, but does not contain any reference to NBT data at all).That said, TypeError: string indices must be integers
usually means that you are trying to do something like this:
>>> nbt = "hello world"
>>> nbt[6]
'w'
>>> nbt['i']
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: string indices must be integers
So, I suspect that your data structure is different from what you suspect. You seem to suspect a dict
, but the data is a string
. However, with the limited information you provided, I can't determine if nbt
, nbt['i'].tags[0]
, nbt['i'].tags[0]['tag']
or nbt['i'].tags[0]['tag']['display']
is a string
instead of a dict
.
When parsing NBT data decoded from Base64 string, and parsing it, I'm getting the typerror above. Here is my code: https://pastebin.com/3Ak0m6YL
Here are my logs: https://pastebin.com/mDV5fnf9
Thanks in advance!