Skip to content

Fix potential UnicodeDecodeError when reading sidebar JSON files#2800

Merged
beckermr merged 1 commit intoconda-forge:mainfrom
Akash504-ai:fix-sidebar-encoding
Apr 8, 2026
Merged

Fix potential UnicodeDecodeError when reading sidebar JSON files#2800
beckermr merged 1 commit intoconda-forge:mainfrom
Akash504-ai:fix-sidebar-encoding

Conversation

@Akash504-ai
Copy link
Copy Markdown
Contributor

Summary

Fixes a potential UnicodeDecodeError when reading sidebar JSON files.

Details

On Windows, Python uses cp1252 as the default encoding when reading files.
The sidebar JSON files are UTF-8 encoded, which can lead to decoding errors when using read_text() without specifying an encoding.

This change explicitly sets UTF-8 encoding when reading _sidebar*.json files, ensuring consistent cross-platform behavior.

Testing

  • Verified locally on Windows
  • Confirmed that .ci_scripts/check_sidebars.py runs without encoding issues

Notes

This change aligns with similar encoding fixes in CI scripts and improves reliability across operating systems.

@Akash504-ai Akash504-ai requested a review from a team as a code owner April 7, 2026 12:50
@netlify
Copy link
Copy Markdown

netlify bot commented Apr 7, 2026

Deploy Preview for conda-forge-previews ready!

Name Link
🔨 Latest commit a91690f
🔍 Latest deploy log https://app.netlify.com/projects/conda-forge-previews/deploys/69d4fd9e6c0ea50008f15225
😎 Deploy Preview https://deploy-preview-2800--conda-forge-previews.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 71
Accessibility: 96
Best Practices: 100
SEO: 89
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

@beckermr beckermr enabled auto-merge (squash) April 7, 2026 14:53
@beckermr beckermr disabled auto-merge April 8, 2026 12:38
@beckermr beckermr merged commit c00e4d8 into conda-forge:main Apr 8, 2026
8 of 9 checks passed
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.

2 participants