TypeError: tuple indices must be integers or slices, not str
See original GitHub issueHi, I have a little problem. when I run
python3 -m scripts.train --algo ppo --env MiniGrid-DoorKey-5x5-v0 --model DoorKey --save-interval 10 --frames 80000
It goes like
image": preprocess_images([obs["image"] for obs in obss], device=device),
TypeError: tuple indices must be integers or slices, not str
which happened here:
def preprocess_obss(obss, device=None):
return torch_ac.DictList({
"image": preprocess_images([obs["image"] for obs in obss], device=device),
"text": preprocess_texts([obs["mission"] for obs in obss], vocab, device=device)
})
preprocess_obss.vocab = vocab
How should I fix it? Thx
Issue Analytics
- State:
- Created a year ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
TypeError: tuple indices must be integers, not str
I am trying to pull data from a database and assign them to different lists. This specific error is giving me a lot...
Read more >TypeError: tuple indices must be integers or slices, not str
The Python "TypeError: tuple indices must be integers or slices, not str" occurs when we use a string instead of an integer to...
Read more >Python pandas TypeError tuple indices must be integers or ...
df.iterrows() returns a tuple with index and the row value. ... TypeError: list indices must be integers or slices, not str.
Read more >TypeError: tuple indices must be integers, not str - Codecademy
TypeError : tuple indices must be integers, not str ... they are considered tuples, tuples are like lists except immutable (can't be changed...
Read more >TypeError: tuple indices must be integers or slices, not str ...
The typeerror: tuple indices must be integers or slices, not str error comes when you can't get row information using row["pool_number"].
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’ll look into this today
@saleml Should rl-starter-files be modified to work with the new version of gym-minigrid?