We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The following works fine on a clean VSCode :
import os import sys sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
But it fails on Positron with the following error
NameError: name '__file__' is not defined Cell In[5], line 1 ----> 1 sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
The text was updated successfully, but these errors were encountered:
Could you please detail what you're doing exactly?
I can reproduce with executeCode (Cmd+Enter or Ctrl+Enter) but not with Run Python File (the arrow in the screenshot below):
executeCode
Run Python File
Ideally running line by line would produce the same effect as running the file but that is not always possible.
Sorry, something went wrong.
We suspect this may be related to work we've done on the working directory in the console.
In the console, there is no active __file__.
__file__
No branches or pull requests
The following works fine on a clean VSCode :
But it fails on Positron with the following error
The text was updated successfully, but these errors were encountered: