Skip to content

can't run python files that are nested and not in root directory Β #1643

@NoamRivlin

Description

@NoamRivlin

Describe the bug

when running root .py files they work, but if they are nested in just one level, they cant run,
err:
python3 asd.py
[ERROR rustpython_vm::vm::compile] Failed reading file 'asd.py': No such file or directory (os error 44)

Link to the blitz that caused the error

https://stackblitz.com/edit/secret-python-ievrm4?file=main.py,new_folder%2Fsub_folder%2Ffilesystem.py,new_folder%2Fasd.py&title=Python%20Starter

Steps to reproduce

run python3 main.py

run cd new_folder/
then run python3 asd.py

Expected behavior

running python3 asd.py should work, same as main.py in root

Parity with Local

Screenshots

image

Platform

Browser name  = Chrome
Full version  = 131.0.0.0
Major version = 131
navigator.appName = Netscape
navigator.userAgent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36
performance.memory = {
  "totalJSHeapSize": 183374943,
  "usedJSHeapSize": 153175843,
  "jsHeapSizeLimit": 4294705152
}
Hash = 88b6dd69

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions