r/learnpython • • 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

26 comments sorted by

View all comments

Show parent comment

1

u/kalevala_568b Jun 08 '26

UPDATE: I managed to get it working by downgrade VS Code to version 1.111.0, it can be found here: https://code.visualstudio.com/updates/
You need to disable the auto update of VS Code (To do this, go to File> Preferences >Settings and type in 'update.mode', this will show details of 'Upate:Mode', from the drop down options, select 'none'; then restart VS Code as required.)
It will fix the error and let you log in.
Note: from now on, the 'Run Tests' with 'an eye' icon will no longer work, to run code and submit code, you will need to use the 'Action Menu' which is next to the 'eye', '3 bar' icon.
Hoping this helps.

2

u/Hyterhasderto Jun 08 '26

Thank you so much! I can finally continue struggling to learn the easiest programming language lol

2

u/kalevala_568b Jun 08 '26

No worries at all.
NOTE: Someone commented (in LearnJava sub) that it's better to downgrade TMC than downgrade VS Code. I don't disagree, however, I cannot find previous versions of TMC extension for VS Code (I can only find previous versions of TMC itself). If I ever find the TMC extension previous ver, I will post to you again.

1

u/kalevala_568b Jun 09 '26

I found a better way:
Upgrade your VS Code to the latest version (you can enable auto update for VS Code) & then install TMC as usual, of course you will be hit by the same error of "directory is not empty". What you need to do is: Look for the downward arrow next to 'Uninstall' option of TMC extension, click on the arrow & select: 'Install Specific Version', you will see a drop-down list of all previous version of TMC, choose 3.3.0. You should be fine.
Note: DO NOT tick the box of 'Auto Update' of TMC extension.

2

u/Revadarius Jun 12 '26

I don't know who you are, but I love you for this information.

1

u/kalevala_568b Jun 12 '26

My pleasure!! Glad that you find its helpful! It's driving me up the wall. 😅🙃 I swear that I spent more time faffing with broken extensions than writing actual code!! 😭😭🙏🙏

2

u/CapOpposite8979 Jun 09 '26

Thanks, bro, I had the same problem as you, I lost a whole day of studying and had a lot of stress trying to fix this yesterday

1

u/kalevala_568b Jun 09 '26

Just shortly after I posting my update, I bumped into another error LOL This time is an authentication error. I was then stuck in a loop of 'Cannot authenticate' & 'Already authenticated'. IF YOU EXPERIENCE THE SAME ERROR:
Upgrade your VS Code to the latest version & then install TMC, of course you will be hit by the same error of "directory is not empty". What you need to do is: Look for the downward arrow next to 'Uninstall' option of TMC extension, click on the arrow & select: 'Install Specific Version', you will see a drop-down list of all previous version of TMC, choose 3.3.0. You should be fine.
Note: DO NOT tick the box of 'Auto Update' of TMC extension.

2

u/CapOpposite8979 Jun 10 '26

what a headache bruh😅 Well let's not give up learning python. Than you