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

encoding='utf-8' for reading contracts #1712

Merged
merged 1 commit into from
Jan 29, 2024

Conversation

Hecate2
Copy link
Contributor

@Hecate2 Hecate2 commented Sep 28, 2023

What I did

On Windows without utf-8 encoding by default, there can be errors like UnicodeDecodeError: 'gbk' codec can't decode byte 0x80 in position 52: illegal multibyte sequence when contracts are being read.
Related issue: None

How I did it

Using encoding='utf-8' for contracts

How to verify it

I cloned https://github.com/RockX-SG/stake and made brownie work with the contracts on Windows 10.

Checklist

  • I have confirmed that my PR passes all linting checks
  • I have included test cases
  • I have updated the documentation
  • I have added an entry to the changelog

@iamdefinitelyahuman
Copy link
Member

Pretty straightforward fix, thanks

@iamdefinitelyahuman iamdefinitelyahuman merged commit 86350fb into eth-brownie:master Jan 29, 2024
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