Skip to content

[bug] bpython crashes #902

Closed
Closed

Description

@nikitax44

change dir to /
type "import " and do not press enter it will crash with this traceback:

bpython.mp4
Traceback (most recent call last):
  File "/tmp/test1/venv/bin/bpython", line 8, in <module>
    sys.exit(main())
  File "/tmp/test1/venv/lib/python3.8/site-packages/bpython/curtsies.py", line 201, in main
    exit_value = repl.mainloop(True, paste)
  File "/tmp/test1/venv/lib/python3.8/site-packages/bpython/curtsies.py", line 115, in mainloop
    while self.module_gatherer.find_coroutine():
  File "/tmp/test1/venv/lib/python3.8/site-packages/bpython/importcompletion.py", line 226, in find_coroutine
    next(self.find_iterator)
  File "/tmp/test1/venv/lib/python3.8/site-packages/bpython/importcompletion.py", line 217, in find_all_modules
    for module in self.find_modules(p):
  File "/tmp/test1/venv/lib/python3.8/site-packages/bpython/importcompletion.py", line 202, in find_modules
    for subname in self.find_modules(path_real):
  File "/tmp/test1/venv/lib/python3.8/site-packages/bpython/importcompletion.py", line 202, in find_modules
    for subname in self.find_modules(path_real):
  File "/tmp/test1/venv/lib/python3.8/site-packages/bpython/importcompletion.py", line 202, in find_modules
    for subname in self.find_modules(path_real):
  [Previous line repeated 1 more time]
  File "/tmp/test1/venv/lib/python3.8/site-packages/bpython/importcompletion.py", line 199, in find_modules
    stat = path_real.stat()
  File "/usr/lib/python3.8/pathlib.py", line 1198, in stat
    return self._accessor.stat(self)
FileNotFoundError: [Errno 2] No such file or directory: '/sys/kernel/security/apparmor/apparmorfs:[12490]'

Activity

  1. changed the title [-]bpython crashes[/-] [+][bug]bpython crashes[/+] on Aug 1, 2021
  2. changed the title [-][bug]bpython crashes[/-] [+][bug] bpython crashes[/+] on Aug 1, 2021
  3. added this to the release-0.22 milestone on Aug 1, 2021
  4. added a commit that references this issue on Feb 25, 2026
    7f325df
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions