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

Raise a friendly TypeError for wrong file mode #175

Merged
merged 4 commits into from
Jan 30, 2022

Conversation

hauntsaninja
Copy link
Collaborator

No description provided.

@hauntsaninja
Copy link
Collaborator Author

With the recent discussion about load, figured a friendlier error than AttributeError: 'str' object has no attribute 'decode' might help if this is a mistake people will make.

src/tomli/_parser.py Outdated Show resolved Hide resolved
@hukkin hukkin merged commit 8b962e1 into hukkin:master Jan 30, 2022
@hauntsaninja hauntsaninja deleted the typeerror branch January 30, 2022 07:55
hauntsaninja added a commit to hauntsaninja/tomli that referenced this pull request Oct 2, 2024
hukkin pushed a commit to hauntsaninja/tomli that referenced this pull request Oct 8, 2024
hukkin pushed a commit that referenced this pull request Oct 8, 2024
* Add test coverage for text mode error

Error message was added in #175

* review
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