Skip to content

Commit 9170eee

Browse files
committed
Resolved an issue with "ModuleNotFoundError: No module named 'chardet'" on macOS ARM // Resolve platformio#4702
1 parent 89f4574 commit 9170eee

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

HISTORY.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ PlatformIO Core 6
2222
* Resolved an issue encountered while utilizing the `pio pkg exec <https://docs.platformio.org/en/latest/core/userguide/pkg/cmd_exec.html>`__ command on the Windows platform to execute Python scripts from a package
2323
* Implemented a crucial improvement to the `pio run <https://docs.platformio.org/en/latest/core/userguide/cmd_run.html>`__ command, guaranteeing that the ``monitor`` target is not executed if any of the preceding targets, such as ``upload``, encounter failures
2424
* `Cppcheck <https://docs.platformio.org/en/latest/plus/check-tools/cppcheck.html>`__ v2.11 with new checks, CLI commands and various analysis improvements
25+
* Resolved a critical issue that arose on macOS ARM platforms due to the Python "requests" module, leading to a "ModuleNotFoundError: No module named 'chardet'" (`issue #4702 <https://github.com/platformio/platformio-core/issues/4702>`_)
2526

2627
6.1.9 (2023-07-06)
2728
~~~~~~~~~~~~~~~~~~

setup.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@
2626
__install_requires__,
2727
)
2828

29+
# issue #4702; Broken "requests/charset_normalizer" on macOS ARM
30+
if platform.system() == "Darwin" and "arm" in platform.machine().lower():
31+
__install_requires__.append("chardet>=3.0.2,<4")
2932

3033

3134
setup(

0 commit comments

Comments
 (0)