oracle / graalpython

GraalPy – A high-performance embeddable Python 3 runtime for Java
https://www.graalvm.org/python/
Other
1.24k stars 108 forks source link

os.chdir raises FileNotFoundError even though the directory exists #183

Closed oroppas closed 3 years ago

oroppas commented 3 years ago

CPython

Python 3.8.5 (default, Sep  4 2020, 07:30:14)
[GCC 7.3.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> os.getcwd()
'/home/ryuta/tmp'
>>> os.listdir('.')
['foo']
>>> os.chdir('foo')
>>>

GraalPython

Python 3.8.5 (Sun Jan 17 18:07:39 JST 2021)
[Graal, GraalVM CE, Java 11.0.9] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> os.getcwd()
'/home/ryuta/tmp'
>>> os.listdir('.')
['foo']
>>> os.chdir('foo')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
FileNotFoundError: [Errno 2] No such file or directory: 'foo'
>>>
msimacek commented 3 years ago

We have recently refactored our POSIX support and it seems that chdir doesn't accept relative paths anymore. Thank you for the report, we will fix it shortly

msimacek commented 3 years ago

Fixed in 5e09b1e6b