Problem
When attempting to generate documentation using the PyArchInit DocuGenius plugin in PyCharm, the process fails with the following error:
UnicodeEncodeError: 'charmap' codec can't encode character '\U0001f4e6' in position 0: character maps to <undefined>
This results in the documentation generation failing with exit code 1.
Cause
The error occurs because the plugin script attempts to print Unicode characters (e.g., emojis), but the system’s default encoding (such as cp1252 on Windows) does not support those characters. Additionally, IDE-level encoding settings or terminal-specific configurations do not propagate to the child Python processes executing the plugin's scripts.
Resolution
To resolve the issue, set the following environment variables at the system level to ensure the Python process uses UTF-8 encoding globally:
- Open your system's environment variable settings and add the following:
PYTHONUTF8=1PYTHONIOENCODING=utf-8
- Reboot your system to apply the changes.
Once the environment variables are set, the plugin should work as intended, and documentation generation will proceed without errors.
If the issue persists, consider contacting the plugin author directly through the contact information provided on the PyArchInit DocuGenius Marketplace page.
Comments
0 comments
Please sign in to leave a comment.