The editor could not be opened due to an unexpected error: File is a directory
Reveal in Explorer View

Reason:
You must have named the directory (folder/package) as a file name, for example, sample.py or Sample.java, and expect it to be a file.
Fix:
Delete the folder and re-create it as a file, you may click on the new file.. icon next to your project folder.

Provide Feedback For This Article
We take your feedback seriously and use it to improve our content. Thank you for helping us serve you better!
😊 Thanks for your time, your feedback has been registered!
Comments & Discussion
Facing issues? Have questions? Post them here! We're happy to help!