[pypy-issue] Issue #2247: os.stat().st_atime returns Error (pypy/pypy)

Kunal Grover issues-reply at bitbucket.org
Tue Mar 1 09:18:26 EST 2016


New issue 2247: os.stat().st_atime returns Error
https://bitbucket.org/pypy/pypy/issues/2247/osstat-st_atime-returns-error

Kunal Grover:

Trying to use the snippet, results below.

```
#!python
import os
a = os.stat('test.py')
a.st_atime

```


```
#!python
Traceback (most recent call last):
  File "pypy/bin/pyinteractive.py", line 206, in <module>
    sys.exit(main_(sys.argv))
  File "pypy/bin/pyinteractive.py", line 192, in main_
    con.interact(banner)
  File "/Users/kunal/pypy/pypy/interpreter/interactive.py", line 135, in interact
    code.InteractiveConsole.interact(self, banner)
  File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/code.py", line 243, in interact
    more = self.push(line)
  File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/code.py", line 265, in push
    more = self.runsource(source, self.filename)
  File "/Users/kunal/pypy/pypy/interpreter/interactive.py", line 197, in runsource
    main.run_toplevel(self.space, doit, verbose=self.verbose)
  File "/Users/kunal/pypy/pypy/interpreter/main.py", line 108, in run_toplevel
    f()
  File "/Users/kunal/pypy/pypy/interpreter/interactive.py", line 182, in doit
    self.console_compiler_flags)
  File "/Users/kunal/pypy/pypy/interpreter/pycompiler.py", line 56, in compile_command
    code = self.compile(source, filename, mode, flags)
  File "/Users/kunal/pypy/pypy/interpreter/pycompiler.py", line 171, in compile
    mod = self._compile_to_ast(source, info)
  File "/Users/kunal/pypy/pypy/interpreter/pycompiler.py", line 164, in _compile_to_ast
    e.wrap_info(space))
  File "/Users/kunal/pypy/pypy/interpreter/pyparser/error.py", line 22, in wrap_info
    w_filename = space.fsdecode(space.wrapbytes(self.filename))
  File "/Users/kunal/pypy/pypy/interpreter/baseobjspace.py", line 1634, in fsdecode
    return fsdecode(space, w_obj)
  File "/Users/kunal/pypy/pypy/interpreter/unicodehelper.py", line 69, in fsdecode
    errorhandler=state.decode_error_handler)[0]
  File "/Users/kunal/pypy/rpython/rlib/runicode.py", line 137, in str_decode_utf_8
    result=result)
  File "/Users/kunal/pypy/rpython/rlib/runicode.py", line 156, in str_decode_utf_8_impl
    n = utf8_code_length[ordch1]
IndexError: list index out of range

```





More information about the pypy-issue mailing list