Skip to content

Added explicit UTF-8 encoding and detailed exception logging#9

Open
Frahane wants to merge 1 commit intoQaisarRajput:mainfrom
Frahane:main
Open

Added explicit UTF-8 encoding and detailed exception logging#9
Frahane wants to merge 1 commit intoQaisarRajput:mainfrom
Frahane:main

Conversation

@Frahane
Copy link
Copy Markdown

@Frahane Frahane commented Jun 25, 2025

  • Open files explicitly with encoding='utf-8' to avoid platform-dependent default encoding issues - Specifying utf-8 ensures all Unicode characters are properly encoded.

  • Catch exceptions with except Exception as e: to get the exception object.

  • Print the exception message along with the file path.

  • If verbose mode is enabled, print the full traceback to help diagnose the exact error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant