Medical-Event-Data-Standard / Medical-Event-Data-Standard/MEDS-DEV

overwrite=True: runs into directory not empty errors

Open
#268 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
43
Forks
10
PR merge metrics
No merged PRs in 30d

Description

The command here:
https://github.com/Medical-Event-Data-Standard/MEDS-DEV/blob/92bfba2af947378a6f4d2d74848a6d360e7df6a3/src/MEDS_DEV/utils.py#L339

Still runs into errors:

OSError: [Errno 39] Directory not empty: dir_to_remove/.logs

(which it shouldn't)
Manually removing with rm -r seems to always work, though.
Found this discussion, which rather confuses me. Seems that we should just retry it? Or perhaps use the cli argument instead (although this then reduces cross-compatibility)?

Contributor guide

Open the contributing guide

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

Inspect src/MEDS_DEV/utils.py around line 339 and reproduce the overwrite=True case involving the non-empty .logs directory. Compare the behavior with the linked CPython discussion and the rm -r result. Done means overwriting no longer raises OSError: [Errno 39] Directory not empty.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.