selfteaching / selfteaching/selfteaching-python-camp

Day09 python 读取json文件时报错UnicodeDecodeError该如何处理?

Open
#786 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

学习心得分享
Dominant language
Python
Stars
151
Forks
875
PR merge metrics
No merged PRs in 30d

Description

解决办法1.

FILE_OBJECT= open('order.log','r', encoding='UTF-8')

解决办法2.

FILE_OBJECT= open('order.log','rb')

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Day09 lesson material and the order.log examples mentioned in the issue. Determine whether the lesson should clarify UTF-8 text mode versus binary mode for the UnicodeDecodeError, then document the expected handling and verify the example remains consistent.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.