SQLite на PostgreSQL
Делаю dumpdata, меняю БД в настройках, синхронизирую командой migrate —run-syncdb. А на операции loaddata возникает ошибка DeserializationError: Problem installing fixture
Может у кого-нибудь есть опыт в решении такой проблемы?
Трейсбэк весь?
Да, скинуть сюда? Он объемный
pastebin
Попробуй сделать дампы отдельных приложений твоего проекта и загрузить их, а не всю бд
Traceback (most recent call last): File "G:\Django\venvs\electro_64\lib\site-packages\django\core\serializers\json.py", line 68, in Deserializer objects = json.loads(stream_or_string) File "C:\Python\Python_x64\Python38\lib\json\__init__.py", line 357, in loads return _default_decoder.decode(s) File "C:\Python\Python_x64\Python38\lib\json\decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "C:\Python\Python_x64\Python38\lib\json\decoder.py", line 355, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) The above exception was the direct cause of the following exception: Traceback (most recent call last): File "manage.py", line 21, in <module> main() File "manage.py", line 17, in main execute_from_command_line(sys.argv) File "G:\Django\venvs\electro_64\lib\site-packages\django\core\management\__init__.py", line 401, in execute_from_command_line utility.execute() File "G:\Django\venvs\electro_64\lib\site-packages\django\core\management\__init__.py", line 395, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "G:\Django\venvs\electro_64\lib\site-packages\django\core\management\base.py", line 328, in run_from_argv self.execute(*args, **cmd_options) File "G:\Django\venvs\electro_64\lib\site-packages\django\core\management\base.py", line 369, in execute output = self.handle(*args, **options) File "G:\Django\venvs\electro_64\lib\site-packages\django\core\management\commands\loaddata.py", line 72, in handle self.loaddata(fixture_labels) File "G:\Django\venvs\electro_64\lib\site-packages\django\core\management\commands\loaddata.py", line 114, in loaddata self.load_label(fixture_label) File "G:\Django\venvs\electro_64\lib\site-packages\django\core\management\commands\loaddata.py", line 172, in load_label for obj in objects: File "G:\Django\venvs\electro_64\lib\site-packages\django\core\serializers\json.py", line 73, in Deserializer raise DeserializationError() from exc django.core.serializers.base.DeserializationError: Problem installing fixture 'G:\Django\RESTprj\RESTprj\dumpdata.json':
Есть какая-нибудь инструкция как это сделать?
Обсуждают сегодня