Settings in pycharm -> search for 'File Encodings' Change 'Project Encoding' to UTF-8 in the dropdown menu.