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(dashboard): fix error in windows for csvreader #3806

Merged
merged 3 commits into from
Apr 18, 2024
Merged

Conversation

pedrooot
Copy link
Member

Context

Fixes #3766

Description

Windows was having some problems with the encoding from csv files, adding encoding="utf-8" when a csv file is opened fixes it.

License

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@pedrooot pedrooot requested review from a team as code owners April 17, 2024 10:54
@pedrooot pedrooot added the status/awaiting-reponse Waiting response from Issue owner label Apr 17, 2024
Copy link

codecov bot commented Apr 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.53%. Comparing base (a2f84a1) to head (8f44aca).
Report is 3 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3806      +/-   ##
==========================================
+ Coverage   85.51%   85.53%   +0.02%     
==========================================
  Files         731      731              
  Lines       22659    22661       +2     
==========================================
+ Hits        19376    19384       +8     
+ Misses       3283     3277       -6     

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

@@ -37,7 +37,7 @@

csv_files = []
for file in glob.glob(os.path.join(folder_path_compliance, "*.csv")):
with open(file, "r", newline="") as csvfile:
with open(file, "r", newline="", encoding="utf-8") as csvfile:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add the encoding in the config and the use it here? The same for the other file.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, I´ve already done it

@jfagoagas jfagoagas self-requested a review April 18, 2024 13:27
Copy link
Member

@jfagoagas jfagoagas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great catch!

@jfagoagas jfagoagas merged commit 833dc83 into master Apr 18, 2024
11 checks passed
@jfagoagas jfagoagas deleted the windows-bug branch April 18, 2024 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/awaiting-reponse Waiting response from Issue owner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants