On another thread about the UNO, it states that the LED is buffered with an op-amp, so I don't see how removing the LED can change the behaviour of the pin...
On my project I have the pin connected to a keyswitch that pulls the input low when switched on, and there is a 10K pullup to 3V3. On the Wemos D1 Mini, the only input that has an internal pullup, (and it's permanently enabled) is D3.
The in-built LED is ON when the keyswitch is ON, meaning D4 is pulled to GND. When the switch is OFF, the input voltage is 1.3V, and I would have expected it to be 3.3V. This seems to shout at me that the LED is not buffered at all,
My current train of thought is that the LED is not buffered in any fashion, and I'm probably measuring the cathode voltage of the LED.
I think, therefore, I am going to avoid using D4 for my keyswitch as it is causing issues with uploading...
There is a 1K resistor connected between the LED and +3.3V.
When using this pin as an input, there may actually be some voltage on the pin.
Can you post the schematic of your project?
This is your Wemos D1 Mini?
See the schematic to see how the LED is wired.
Removing it makes the board "non-standard", and replacing (if necessary) becomes an issue, besides which the LED is useful as a reference for uploading ...
I have moved D3 and D4 to D7 and D8, issue solved ... Of course I have to "patch" the PCB now, but I'd rather have that scenario than uploading issues, depending on whether the keyswitch is ON or OFF.
It seems that holding D4 low with the keyswitch (which incidentally lights the built-in LED), prevents the IDE from resetting the board for the upload.