Skip to content

Conversation

@candreuv
Copy link

@candreuv candreuv commented Oct 22, 2025

Fixes Issue

Closes #483

Description

Fixes a bug related with reading directories with special characters.

Check List

Check all the applicable boxes:

  • [ x] I understand that my contributions needs to pass the checks;
  • If I created new functions / methods, I documented them and add type hints;
  • If I modified already existing code, I updated the documentation accordingly;
  • [ x] The title of my pull request is a short description of the requested changes.

Screenshots

None

Note to reviewers

None

@jeertmans jeertmans changed the title fix(tempfile): Solved bug related with utf-8 file names fix(lib): solved bug related with utf-8 file names Oct 22, 2025
@jeertmans jeertmans added bug Something isn't working lib Related to the library (a.k.a. module) windows Windows related labels Oct 22, 2025
@codecov
Copy link

codecov bot commented Oct 22, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.12%. Comparing base (40ed77b) to head (c96f6cb).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #572   +/-   ##
=======================================
  Coverage   80.12%   80.12%           
=======================================
  Files          23       23           
  Lines        2038     2038           
=======================================
  Hits         1633     1633           
  Misses        405      405           

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jeertmans
Copy link
Owner

Hi @candreuv, thanks for your PR! When searching through the repository, I think it might be safer to also force UTF-8 encoding here:

with open(path) as f:

also here

with open(path, "w") as f:

and there

with open(dest, "w") as f:

as they might introduce similar bugs.

What do you think?

If you agree, could you also make those changes?

Finally, could you please add an entry to the CHANGELOG.md file?

@candreuv
Copy link
Author

Hi @jeertmans,

In my experience, I think it would be wise to make the encoding changes you suggest. And of course, I will also update CHANGELOG.md.

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

Labels

bug Something isn't working lib Related to the library (a.k.a. module) windows Windows related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] ValueError: [Errno 22] Invalid argument

2 participants