Quantcast
Channel: Active questions tagged utf-8 - Stack Overflow
Viewing all articles
Browse latest Browse all 1045

UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe9 in position 460: invalid continuation byte

$
0
0

I've got a problem with the command loaddata of my Django app.

When I run this command, this UnicodeDecodeError appears because of the "é" that are in my database table.

i've try with many type of database on pgAdmin with different encode type like "UTF-8", "latin-1" or "win1252" or different "character type" or "collation" settings like "C" or "french_switzerland.1252" but every time there is this error.

Here is more information about my work space.

Let me know if you need more informations, I don't give you too much, I don't want to give useless information.

I know there are other questions which look similar to mine but I don't understand the answers. There are explanations about why there is the error but not about how to solve it.

  • I am on Windows 10
  • I'm using Pycharm 2020.3.2
  • Pgadmin v4

the complete error :

(venv) C:\Users\Mathias\PycharmProjects\yufindProject>python manage.py loaddata ask/dumps/ask.jsonTraceback (most recent call last):  File "manage.py", line 22, in <module>    main()  File "manage.py", line 18, in main    execute_from_command_line(sys.argv)  File "C:\Users\Mathias\PycharmProjects\yufindProject\venv\lib\site-packages\django\core\management\__init__.py", line 401, in execute_from_command_line    utility.execute()  File "C:\Users\Mathias\PycharmProjects\yufindProject\venv\lib\site-packages\django\core\management\__init__.py", line 395, in execut    self.fetch_command(subcommand).run_from_argv(self.argv)  File "C:\Users\Mathias\PycharmProjects\yufindProject\venv\lib\site-packages\django\core\management\base.py", line 330, in run_from_argv    self.execute(*args, **cmd_options)  File "C:\Users\Mathias\PycharmProjects\yufindProject\venv\lib\site-packages\django\core\management\base.py", line 371, in execute    output = self.handle(*args, **options)  File "C:\Users\Mathias\PycharmProjects\yufindProject\venv\lib\site-packages\django\core\management\commands\loaddata.py", line 72, in handle    self.loaddata(fixture_labels)  File "C:\Users\Mathias\PycharmProjects\yufindProject\venv\lib\site-packages\django\core\management\commands\loaddata.py", line 114, in loaddata    self.load_label(fixture_label)  File "C:\Users\Mathias\PycharmProjects\yufindProject\venv\lib\site-packages\django\core\management\commands\loaddata.py", line 172, in load_label    for obj in objects:  File "C:\Users\Mathias\PycharmProjects\yufindProject\venv\lib\site-packages\django\core\serializers\json.py", line 67, in Deserializer    stream_or_string = stream_or_string.decode()UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe9 in position 460: invalid continuation byte

Viewing all articles
Browse latest Browse all 1045

Trending Articles