Already figured it out. As it is noted in this answer, the encoding error doesnt come from python, but from the encoding that the console is using. So the way to fix it is to run the command (in windows):
chcp 65001
that sets the encoding to UTF-8 and then run the program again. Or if working on pycharm as I was, go to Settings>Editor>File Encodings and set the IDE and Project encodings accondingly.
More Related Contents:
- How to make python 3 print() utf8
- How can I reconnect to the browser opened by webdriver with selenium?
- How to retrieve the text of a WebElement using Selenium – Python
- selenium.common.exceptions.ElementNotInteractableException: Message: element not interactable when clicking on an element using Selenium Python
- Invalid selector: Compound class names not permitted error using Selenium
- ElementNotVisibleException: Message: element not interactable error while trying to click a button through Selenium and Python
- DeprecationWarning: executable_path has been deprecated, please pass in a Service object
- webdriver.FirefoxProfile(): Is it possible to use a profile without making a copy of it?
- how to set proxy with authentication in selenium chromedriver python?
- python 3.0 open() default encoding
- Why doesn’t Python recognize my utf-8 encoded source file?
- SessionNotCreatedException: Message: session not created from disconnected: unable to connect to renderer with ChromeDriver 2.45 Chrome v71
- How to use Tor with Chrome browser through Selenium
- Selenium “Unable to find a matching set of capabilities” despite driver being in /usr/local/bin
- Should I use encoding declaration in Python 3?
- selenium.common.exceptions.SessionNotCreatedException: Message: session not created from tab crashed using ChromeDriver Chrome Selenium Python
- Failed to load resource: the server responded with a status of 429 (Too Many Requests) and 404 (Not Found) with ChromeDriver Chrome through Selenium
- “Eager” Page Load Strategy workaround for Chromedriver Selenium in Python
- How to click on the anchor element when the spinner obscures it using Selenium and Python?
- AttributeError: ‘WebDriver’ object has no attribute ‘find_element_by_xpath’
- Changing the “locale preferred encoding” in Python 3 in Windows
- How to bypass being rate limited ..HTML Error 1015 using Python
- How to suppress console error/warning/info messages when executing selenium python scripts using chrome canary
- Python 3 CSV file giving UnicodeDecodeError: ‘utf-8’ codec can’t decode byte error when I print
- selenium.common.exceptions.WebDriverException: Message: unknown error: unable to discover open pages using ChromeDriver through Selenium
- In OS X Lion, LANG is not set to UTF-8, how to fix it?
- When importing tensorflow, I get the following error: No module named ‘numpy.core._multiarray_umath’
- Python 3.4 on Sublime Text 3
- Google Cloud Functions Python Logging issue
- using Subprocess to avoid long-running task from disconnecting discord.py bot?