This article will be related to troubleshooting. Today, I managed somehow to write a comment that caused the entire Mage.ai instance to crash due to a UnicodeDecodeError. How did I manage to do that?
Mage.ai UnicodeDecodeError: ‘charmap’ codec can’t decode byte
Mage.ai failed to decode a specific character “ň,” which is specific to the Czech Republic. I’m not sure if this can happen with other character sets, but I’ll provide as much information as possible so that you can potentially catch this error.
The error occurred because I wrote a comment in Python code “# Přesuňte se do cílového adresáře s modelem” (Czech) When attempting to start Mage.ai, an error occurs as shown below, and the Mage.ai instance fails to start – UnicodeDecodeError: ‘charmap’ codec can’t decode byte 0x88 in position 554: character maps to <undefined>
Environment in Which the Error Occurred
The environments in which this occurred are as follows:
I tested the error in five different environments:
- iOS Docker – OK
- iOS pip – OK
- Windows natively – Error
- Windows via Parallels with a custom instance – Error
- Windows via Parallels connected to a Mage.ai instance running on iOS – OK (ip/6789)
Browsers Safari and Chrome – regardless of the environment.