Vote up! 1 Vote down! [FIXED]: partially initialized module 'inspect' has no attribute 'cleandoc' Troubleshooting. Python & Pytorch Issue 2024Q1 (current) Log in or register to post comments The problem was naming a local module with the same name as an imported module. I had a file called ./tokenize.py and moving it to ./run_tokenize.py solved the problem. Please login or register to post a comment.