Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
pypy
pypy
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 603
    • Issues 603
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 13
    • Merge Requests 13
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • PyPy
  • pypypypy
  • Issues
  • #3203

Closed
Open
Created Apr 06, 2020 by Ram@ram-bv

FileNotFoundError in posixpath.py

Here's an exception I got when using the better-exceptions tool on pypy3.6-v7.3.0-linux64. I submitted an issue there too, as I believe there might be multiple bugs here, including CPython standard library bugs.

.3.0-linux64/site-packages/better_exceptions/formatter.py", line 314, in format_exception
    return u''.join(formatted for formatted in self._format_exception(value, tb))
  File "/floof/pypy3.6-v7.3.0-linux64/site-packages/better_exceptions/formatter.py", line 314, in <genexpr>
    return u''.join(formatted for formatted in self._format_exception(value, tb))
  File "/floof/pypy3.6-v7.3.0-linux64/site-packages/better_exceptions/formatter.py", line 303, in _format_exception
    formatted, colored_source = self.format_traceback(exc_traceback)
  File "/floof/pypy3.6-v7.3.0-linux64/site-packages/better_exceptions/formatter.py", line 266, in format_traceback
    formatted, colored = self.format_traceback_frame(tb)
  File "/floof/pypy3.6-v7.3.0-linux64/site-packages/better_exceptions/formatter.py", line 226, in format_traceback_frame
    filename, lineno, function, source, color_source, relevant_values = self.get_traceback_information(tb)
  File "/floof/pypy3.6-v7.3.0-linux64/site-packages/better_exceptions/formatter.py", line 198, in get_traceback_information
    frame_info = inspect.getframeinfo(tb)
  File "/floof/pypy3.6-v7.3.0-linux64/lib-python/3/inspect.py", line 1458, in getframeinfo
    filename = getsourcefile(frame) or getfile(frame)
  File "/floof/pypy3.6-v7.3.0-linux64/lib-python/3/inspect.py", line 700, in getsourcefile
    if getattr(getmodule(object, filename), '__loader__', None) is not None:
  File "/floof/pypy3.6-v7.3.0-linux64/lib-python/3/inspect.py", line 729, in getmodule
    file = getabsfile(object, _filename)
  File "/floof/pypy3.6-v7.3.0-linux64/lib-python/3/inspect.py", line 713, in getabsfile
    return os.path.normcase(os.path.abspath(_filename))
  File "/floof/pypy3.6-v7.3.0-linux64/lib-python/3/posixpath.py", line 383, in abspath
    cwd = os.getcwd()
FileNotFoundError: [Errno 2] No such file or directory

Here are a few things to note:

  1. When getting FileNotFoundError, why doesn't the exception text contain the file name?
  2. Under which circumstances can os.getcwd() even cause FileNotFoundError?
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None