Following is the error I am getting when uploading the blink code to a Wemos D1 mini for testing...
when searching for this error I found no leads whatsoever!
Fatal Python error: initfsencoding: unable to load the file system codec
ModuleNotFoundError: No module named 'encodings'
Current thread 0x00002b30 (most recent call first):
exit status 3
C:\Program Files (x86)\Arduino\arduino-builder returned 3
Error compiling for board LOLIN(WEMOS) D1 R2 & mini.
This error indicates that a Python dependency is missing: the "encodings" module. I haven't seen this specific one before. Reports of a missing "serial" module used to come up regularly from the ESP8266 users, so you might do a search for that keyword instead.
The ESP8266 Boards platform is installed to a different location from the Arduino IDE. So uninstalling the Arduino IDE has no effect on the ESP8266 installation and would not be expected to help with this problem.
If you want to try a complete uninstall of the ESP8266 platform, you can follow this procedure:
I see now that they changed the article. The instructions were better before.
Here they are:
Be aware this will remove any boards you have installed via Boards Manager. They are easy enough to reinstall again though.
Select File > Preferences from the Arduino IDE's menus.
Click the link on the line following "More preferences can be edited directly in the file". This will open the Arduino15 (or similar name depending on your operating system) folder.
Delete all files and folders under the Arduino15 folder except for the preferences.txt file. Please be very careful when deleting things from your computer. When in doubt, back up!
Now you will need to re-install the boards you just uninstalled:
Select Tools > Board > Boards Manager from the Arduino IDE's menus.
Wait for the update to finish.
Reinstall the boards platforms (e.g., "esp8266 by ESP8266 Community") you need.
Click the Close button
You can now try compiling again to see whether that procedure fixed the problem.
still Arduino IDE is giving me the following error inspite of python being on the path of Win7 and Python gets executed from anywhere on the command prompt.
Error as follows:
Fatal Python error: initfsencoding: unable to load the file system codec
ModuleNotFoundError: No module named 'encodings'
Current thread 0x00001e7c (most recent call first):
exit status 3
C:\Program Files (x86)\Arduino\arduino-builder returned 3
Error compiling for board LOLIN(WEMOS) D1 R2 & mini.
tried all options but Arduino IDE is still failing.
it keeps going to \AppData\\Local\\Arduino15\\packages\\esp8266\\tools\\python3\\3.7.2-post1/python3
and gives the following error
Fatal Python error: initfsencoding: unable to load the file system codec
ModuleNotFoundError: No module named 'encodings'
Current thread 0x00000fec (most recent call first):
exit status 3
C:\Program Files (x86)\Arduino\arduino-builder returned 3
Error compiling for board LOLIN(WEMOS) D1 R2 & mini.
I have Python 3.8 installed on my Windows 7 machine and the path has been added to the environment variables.
Python can be executed from command prompt through any folder or directly without issues.
Only Arduino IDE is unable to use Python for itself. I also can't understand how to change the path of Python which is used by Arduino IDE when compiling.
thank you for the update... just check as per your instructions and being a novice with Python I am not able to get it as you showed. maybe i am wrong and I completely agree to being wrong with no experience in working with that kind of detail.
Oops, sorry about that. It is explained by this comment:
# These will be removed by the packager script when doing a JSON release
This information is automatically generated by the build system, and so removed when they create the release version of the ESP8266 boards platform you're using.
They only have it defined in the file I linked to facilitate beta testing.