Dynamic Django settings.
Find a file
Felipe Gonzalez 69d5e8f0a9
fix: Fixed _pickle.UnpicklingError
Error Details
The migration process attempted to apply the migration 0003_drop_pickle but failed with the following traceback:

```bash
Operations to perform:
  Target specific migration: 0003_drop_pickle, from constance
Running migrations:
  Applying constance.0003_drop_pickle...Traceback (most recent call last):
  File "/code/manage.py", line 23, in <module>
    main()
  File "/code/manage.py", line 19, in main
    execute_from_command_line(sys.argv)
  File "/code/.venv/lib/python3.12/site-packages/django/core/management/__init__.py", line 442, in execute_from_command_line
    utility.execute()
  File "/code/.venv/lib/python3.12/site-packages/django/core/management/__init__.py", line 436, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/code/.venv/lib/python3.12/site-packages/django/core/management/base.py", line 413, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/code/.venv/lib/python3.12/site-packages/django/core/management/base.py", line 459, in execute
    output = self.handle(*args, **options)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/code/.venv/lib/python3.12/site-packages/django/core/management/base.py", line 107, in wrapper
    res = handle_func(*args, **kwargs)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/code/.venv/lib/python3.12/site-packages/django/core/management/commands/migrate.py", line 357, in handle
    post_migrate_state = executor.migrate(
                         ^^^^^^^^^^^^^^^^^
  File "/code/.venv/lib/python3.12/site-packages/django/db/migrations/executor.py", line 135, in migrate
    state = self._migrate_all_forwards(
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/code/.venv/lib/python3.12/site-packages/django/db/migrations/executor.py", line 167, in _migrate_all_forwards
    state = self.apply_migration(
            ^^^^^^^^^^^^^^^^^^^^^
  File "/code/.venv/lib/python3.12/site-packages/django/db/migrations/executor.py", line 255, in apply_migration
    state = migration.apply(state, schema_editor)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/code/.venv/lib/python3.12/site-packages/django/db/migrations/migration.py", line 132, in apply
    operation.database_forwards(
  File "/code/.venv/lib/python3.12/site-packages/django/db/migrations/operations/special.py", line 196, in database_forwards
    self.code(from_state.apps, schema_editor)
  File "/code/.venv/lib/python3.12/site-packages/constance/migrations/0003_drop_pickle.py", line 43, in migrate_pickled_data
    print(pickle.loads(value))
          ^^^^^^^^^^^^^^^^^^^
_pickle.UnpicklingError: invalid load key, '{'.
```

The error indicates that there is an issue with unpickling data during the migration process. Specifically, it raises an `_pickle.UnpicklingError` with the message "invalid load key, '{'." This suggests that the data being loaded may be corrupted or not in the expected format.
2024-08-30 17:23:56 -05:00
.github Ping gh-action-pypi-publish version (#568) 2024-08-23 14:13:20 -05:00
constance fix: Fixed _pickle.UnpicklingError 2024-08-30 17:23:56 -05:00
docs docs/index.rst: Fix typo newsletter (#567) 2024-08-23 17:07:24 +05:00
example Enable more rules for ruff (#562) 2024-07-05 19:38:26 +05:00
tests Replace pickle with JSON (#564) 2024-08-20 09:35:27 -05:00
.coveragerc Replace pickle with JSON (#564) 2024-08-20 09:35:27 -05:00
.gitignore Refactor app and model 2023-03-10 20:38:31 +03:00
.pre-commit-config.yaml [pre-commit.ci] pre-commit autoupdate (#558) 2024-07-01 16:07:42 -05:00
.readthedocs.yaml feat(docs): migrate to sphinx 7 (#553) 2024-06-14 19:57:30 +05:00
AUTHORS Replace pickle with JSON (#564) 2024-08-20 09:35:27 -05:00
CODE_OF_CONDUCT.md Jazzband: Created local 'CODE_OF_CONDUCT.md' from remote 'CODE_OF_CONDUCT.md' (#457) 2021-10-21 13:49:53 -05:00
CONTRIBUTING.md Fix spelling issues in CONTRIBUTING and changelog. 2018-05-22 22:36:05 -04:00
LICENSE Happy 2007 2017-02-17 08:06:06 -05:00
MANIFEST.in Pack static files into release 2017-10-02 22:43:45 +07:00
pyproject.toml Fix #570 (#571) 2024-08-23 14:13:54 -05:00
README.rst Update badges. 2020-11-30 21:03:00 +01:00
tox.ini Fix #570 (#571) 2024-08-23 14:13:54 -05:00

Constance - Dynamic Django settings
===================================

.. image:: https://jazzband.co/static/img/badge.svg
   :alt: Jazzband
   :target: https://jazzband.co/

.. image:: https://img.shields.io/readthedocs/django-constance.svg
   :target: https://django-constance.readthedocs.io/
   :alt: Documentation

.. image:: https://github.com/jazzband/django-constance/workflows/Test/badge.svg
   :target: https://github.com/jazzband/django-constance/actions
   :alt: GitHub Actions

.. image:: https://codecov.io/gh/jazzband/django-constance/branch/master/graph/badge.svg
   :target: https://codecov.io/gh/jazzband/django-constance
   :alt: Coverage

A Django app for storing dynamic settings in pluggable backends (Redis and
Django model backend built in) with an integration with the Django admin app.

For more information see the documentation at:

https://django-constance.readthedocs.io/

If you have questions or have trouble using the app please file a bug report
at:

https://github.com/jazzband/django-constance/issues