Im trying to import a python file into my pycharm program.
The file is in the exact same folder as my pycharm project is. I tried to use :
open("happy_histogram.py","r",encoding="utf-8")
but it fails to work.
Appreciate your help!
What are you importing the file for? If you're trying to use some functions and other variables in happy_histogram.py you maybe be better importing it using
from happy_histogram import * 
But to make your code work, I was able to open a file by taking out the encoding. open("happy_histogram.py", "r")  hope that helps.