selfteaching / selfteaching/selfteaching-python-camp

Day09 关于 open(“tang300.json”)运行报错,找不到路径的问题

Open
#1,264 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

duplicate
Dominant language
Python
Stars
151
Forks
875
PR merge metrics
No merged PRs in 30d

Description

我看学友们将tang300.json和main.py存和mymodule文件夹同级目录里,解决了找不到文件的问题,这个解决办法背后的逻辑是什么?

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 example involving main.py, tang300.json, and the mymodule directory, then run it from the documented working directory to observe how open resolves a relative path. Compare that with the arrangement where tang300.json and main.py are beside mymodule. Done means documenting the path-resolution logic and the expected file layout clearly.

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
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.