Hi, I had the same problem as you...I have tried this already at first. No luck...
My phone doesn't arrive at the point where i can do that! The setup process for MIUI9 is interrupted before the WiFi setup...
Which version of TWRP did you use?? I have tried 3 different versions;
1 https://dl.twrp.me/scorpio/ the official one as mentioned by @NeoMod
2 the one from treble (v2) that @Alexionis mentioned and
3 the version from PsiMan.
I tried to flash back to the eu 8.3.8. image but that also failed. It seems it's not even system dependant so no use waiting for friday.
I'm starting to become a little despondent...
This is what I did...
Hopefully your bootloader is already unlocked.
I downloaded the Official China Stable fastboot version of my phone (Mi 6).
I flashed this with MiFlash.
First boot... No device is locked!
I installed the phone quickly because it was a chinese bloatware rom.
Next I flashed twrp in fastboot mode.
Booted in TWRP, Format data & copy the Xiaomi.EU version to internal storage.
After installing this rom in TWRP it booted with "Device is locked..." f**k suck........
But now I was able to fill in the wifi password!
With a wifi connection you just have to type your password of your Mi account and all problems are gone!
Hope it will work for you!