It's hard to read your error stack as the rich-text format it's been pasted as has lost all linebreaks. And while you report using Python 3.12, the filepaths in the error imply you may be using Python 3.10. And, one years-ago report of problems with the same `remove_stopword_tokens` function seemed due to inadvertently using an older Gensim.
I would suggest starting from a clean Python virtual environment of known version without Gensim & related libraries installed. Then, install what you need & try again.
If the same problem recurs, please describe the exact minimal steps to reaching the error message, in terms of what's installed and what code is run, and then show the exact readable error message you received – which may better highlight what's going wrong in your setup.
- Gordon