Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use UTF-8 encoding when opening files #704

Merged
merged 2 commits into from
May 3, 2024
Merged

Conversation

lars-reimann
Copy link
Member

Summary of Changes

Explictly use UTF-8 encoding when opening files. This fixes errors when opening a CSV or JSON file like

UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 6: character maps to <undefined>

if they contained non-ASCII tokens.

Copy link
Contributor

github-actions bot commented May 3, 2024

🦙 MegaLinter status: ✅ SUCCESS

Descriptor Linter Files Fixed Errors Elapsed time
✅ JSON jsonlint 1 0 0.22s
✅ JSON npm-package-json-lint yes no 0.52s
✅ JSON prettier 1 0 0 1.01s
✅ JSON v8r 1 0 2.4s
✅ PYTHON black 4 0 0 1.43s
✅ PYTHON mypy 4 0 3.08s
✅ PYTHON ruff 4 0 0 0.29s
✅ REPOSITORY git_diff yes no 0.27s

See detailed report in MegaLinter reports
Set VALIDATE_ALL_CODEBASE: true in mega-linter.yml to validate all sources, not only the diff

MegaLinter is graciously provided by OX Security

@lars-reimann lars-reimann marked this pull request as ready for review May 3, 2024 13:38
@lars-reimann lars-reimann requested a review from a team as a code owner May 3, 2024 13:38
Copy link

codecov bot commented May 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (eb226f4) to head (2686915).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #704   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           67        67           
  Lines         4782      4782           
=========================================
  Hits          4782      4782           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@lars-reimann lars-reimann merged commit f8c27bc into main May 3, 2024
8 checks passed
@lars-reimann lars-reimann deleted the fix-encoding branch May 3, 2024 13:54
lars-reimann pushed a commit that referenced this pull request May 4, 2024
## [0.23.0](v0.22.1...v0.23.0) (2024-05-04)

### Features

* add `Column.to_table` ([#705](#705)) ([36e4a7a](36e4a7a)), closes [#695](#695)
* added Column.summarize_statistics() ([#715](#715)) ([71730a9](71730a9)), closes [#701](#701)
* replace other values than NaN with imputer ([#707](#707)) ([4a059e0](4a059e0)), closes [#643](#643)

### Bug Fixes

* use UTF-8 encoding when opening files ([#704](#704)) ([f8c27bc](f8c27bc))
@lars-reimann
Copy link
Member Author

🎉 This PR is included in version 0.23.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@lars-reimann lars-reimann added the released Included in a release label May 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released Included in a release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant