oracle / oracle/graalpython

AttributeError: module 'os' has no attribute 'fork'

Open
#374 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
1.6k
Forks
155
Avg merge
9h 42m
Merged PRs (30d)
36

Description

Hello,

Very sorry for asking again a question, i have this error when running my script, as i saw in other issues, this seem to be an issue on graalpython (https://github.com/oracle/graalpython/issues/370):

  File "/root/.local/vfs/venv/lib/python3.10/site-packages/pexpect/pty_spawn.py", line 205, in __init__
    self._spawn(command, args, preexec_fn, dimensions)
  File "/root/.local/vfs/venv/lib/python3.10/site-packages/pexpect/pty_spawn.py", line 303, in _spawn
    self.ptyproc = self._spawnpty(self.args, env=self.env,
  File "/root/.local/vfs/venv/lib/python3.10/site-packages/pexpect/pty_spawn.py", line 315, in _spawnpty
    return ptyprocess.PtyProcess.spawn(args, **kwargs)
  File "/root/.local/vfs/venv/lib/python3.10/site-packages/ptyprocess/ptyprocess.py", line 230, in spawn
    pid, fd = pty.fork()
  File "/opt/graalpy-24.0.0-dev/lib/python3.10/pty.py", line 102, in fork
    pid = os.fork()
AttributeError: module 'os' has no attribute 'fork'

And do you know when ci for dev will be available?

Again, thanks a lot for all your help,

F.N.

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

Start by reproducing the traceback with GraalPy and read the referenced pty.py implementation, especially its call to os.fork. Then inspect the pexpect/ptyprocess call path shown in the traceback and determine whether fork support is expected or unavailable on this runtime. Done means the limitation is resolved or precisely documented, with the relevant test or reproduction confirming the result.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.