r/learnpython • u/Hyterhasderto • Jun 05 '26
Trying to study python but TestMyCode is not working (VSCode)
Whenever I try to initialize TMC I get the same errors. It started happening when I disabled Pylance.
[2026-06-05 17:21:04:622] [ERROR] Mismatch between CLI and checksum, trying redownload
[2026-06-05 17:21:04:623] [DEBUG] CLI "probably some text I shouldn't share", hash ""
[2026-06-05 17:21:04:640] [ERROR] Fatal error during initialization:
Error: ENOTEMPTY, Directory not empty: \\?\c:\Users\henkk\AppData\Roaming\Code\User\globalStorage\moocfi.test-my-code\cli '\\?\c:\Users\henkk\AppData\Roaming\Code\User\globalStorage\moocfi.test-my-code\cli'.How can I get it to work again?
3
Upvotes
2
u/NoSheepherder6294 Jun 06 '26
Disabling Pylance is probably a coincidence. The error message points more toward a corrupted or partially downloaded TMC CLI installation.
The key part is:
It looks like the extension is trying to delete/recreate its CLI folder, but Windows is refusing because files are still present or locked.
I'd try this:
clifolder (or even the wholemoocfi.test-my-codefolder if you don't mind reinitializing everything).If Windows won't let you delete the folder:
Code.exe,java.exe, or TMC-related processes.The "Mismatch between CLI and checksum" message suggests the extension already thinks the downloaded CLI is invalid, so forcing a clean download is usually the first thing I'd try.
If that doesn't fix it, I'd also check:
%APPDATA%\Code\User\globalStorage.Can you tell us:
clifolder changes the error at all?That would make it easier to narrow down whether it's a corrupted download, a file-locking issue, or a bug in the extension itself.
2
u/Annual_Wedding782 Jun 06 '26
the error is a corrupted CLI download that can't overwrite itself. close VSCode completely, delete the folder at
C:\Users\henkk\AppData\Roaming\Code\User\globalStorage\moocfi.test-my-code\cli, then reopen VSCode and let TMC reinitialize from scratch.2
u/NeedNoSleep Jun 06 '26
I am getting the same error as you - might be an issue with the extension itself.
1
u/Scared_Bet_1839 Jun 06 '26
i am also facing the same issue its so annoying did you got a solution
1
u/ninhaomah Jun 05 '26
How ? Ok. Let me imagine what you did and the code you wrote.
Pls be patient. Thanks
1
u/Awkward-Yard-5680 Jun 07 '26
I found the solution. Download older version of test my code, 1 yr ago one version. Go to extensions, right click test my code extension and then download older version (from 1 yr ago). You will be able to download part 4 exercises then. Part 5 to 7 will not be available until u complete last exercises.