apache / apache/beam

--setup_file needs fuller-path

Open
#18,241 0 comments 0 reactions 0 assignees View on GitHub
bug core P3 python
Dominant language
Java
Stars
8.7k
Forks
4.7k
Avg merge
1d 20h
Merged PRs (30d)
196

Description

Running `--setup_file setup.py` fails:

```

File "/Users/lambert/Projects/dancedeets-monorepo/dataflow/lib/apache_beam/runners/dataflow/internal/dependency.py",
line 402, in _build_setup_package
os.chdir(os.path.dirname(setup_file))
OSError: [Errno 2] No such
file or directory: ''

```

Mainly, because it's attempting to do os.chdir('').

Running `--setup_file ./setup.py` works fine.

Imported from Jira [BEAM-1813](https://issues.apache.org/jira/browse/BEAM-1813). Original Jira may contain additional context.
Reported by: mlambert.

Contributor guide

Open the contributing guide

Research direction

Start in apache_beam/runners/dataflow/internal/dependency.py at _build_setup_package around line 402 and reproduce the failure with --setup_file setup.py. Compare it with the working --setup_file ./setup.py case. Done means a bare setup.py path no longer causes os.chdir('') or the reported OSError.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
build-system
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.