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:
- When getting
FileNotFoundError
, why doesn't the exception text contain the file name? - Under which circumstances can
os.getcwd()
even causeFileNotFoundError
?
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information