M
M
Matvey Kot2021-09-07 21:33:41
Python
Matvey Kot, 2021-09-07 21:33:41

How to fix encoding error on startup?

When running a .py file on Ubuntu Server 20.04 with Python 3.8, an error appears: 6137b0410e74d459207233.png
The file was written in PyCharm 2021.2

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vindicar, 2021-09-08
@Vindicar

Is the encoding specified in the first/second line in the python file?
Something like

#!/usr/bin/python3
# -*- coding: utf-8 -*-

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question