Migration 0007 fails #21

Closed
opened 2025-03-24 22:36:38 +01:00 by magicfelix · 3 comments
Member
  Applying kompjuter.0007_blank_without_null...Traceback (most recent call last):
  File "/usr/local/lib/python3.11/dist-packages/netaddr/eui/__init__.py", line 427, in _set_value
    self._value = self._module.str_to_int(value)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/netaddr/strategy/eui48.py", line 176, in str_to_int
    raise AddrFormatError('%r is not a supported MAC format!' % (addr,))
netaddr.core.AddrFormatError: '' is not a supported MAC format!

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.11/dist-packages/macaddress/fields.py", line 76, in to_python
    return EUI(value, version=48, dialect=default_dialect())
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/netaddr/eui/__init__.py", line 374, in __init__
    self.value = addr
    ^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/netaddr/eui/__init__.py", line 429, in _set_value
    raise AddrFormatError(
netaddr.core.AddrFormatError: address '' is not an EUIv48

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/aleksis-admin", line 8, in <module>
    sys.exit(aleksis_cmd())
             ^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/aleksis/core/__main__.py", line 14, in aleksis_cmd
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python3.11/dist-packages/django/core/management/__init__.py", line 442, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python3.11/dist-packages/django/core/management/__init__.py", line 436, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python3.11/dist-packages/django/core/management/base.py", line 413, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/local/lib/python3.11/dist-packages/django/core/management/base.py", line 459, in execute
    output = self.handle(*args, **options)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/django/core/management/base.py", line 107, in wrapper
    res = handle_func(*args, **kwargs)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/django/core/management/commands/migrate.py", line 357, in handle
    post_migrate_state = executor.migrate(
                         ^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/django/db/migrations/executor.py", line 135, in migrate
    state = self._migrate_all_forwards(
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/django/db/migrations/executor.py", line 167, in _migrate_all_forwards
    state = self.apply_migration(
            ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/django/db/migrations/executor.py", line 255, in apply_migration
    state = migration.apply(state, schema_editor)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/django/db/migrations/migration.py", line 132, in apply
    operation.database_forwards(
  File "/usr/local/lib/python3.11/dist-packages/django/db/migrations/operations/fields.py", line 241, in database_forwards
    schema_editor.alter_field(from_model, from_field, to_field)
  File "/usr/local/lib/python3.11/dist-packages/django/db/backends/base/schema.py", line 905, in alter_field
    self._alter_field(
  File "/usr/local/lib/python3.11/dist-packages/django/db/backends/postgresql/schema.py", line 269, in _alter_field
    super()._alter_field(
  File "/usr/local/lib/python3.11/dist-packages/django/db/backends/base/schema.py", line 1132, in _alter_field
    new_default = self.effective_default(new_field)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/django/db/backends/base/schema.py", line 483, in effective_default
    return field.get_db_prep_save(self._effective_default(field), self.connection)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/django/db/models/fields/__init__.py", line 1008, in get_db_prep_save
    return self.get_db_prep_value(value, connection=connection, prepared=False)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/django/db/models/fields/__init__.py", line 1001, in get_db_prep_value
    value = self.get_prep_value(value)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/macaddress/fields.py", line 52, in get_prep_value
    value = self.to_python(value)
            ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/macaddress/fields.py", line 78, in to_python
    raise ValidationError("This value must be a valid MAC address.")
django.core.exceptions.ValidationError: ['This value must be a valid MAC address.']
```plain Applying kompjuter.0007_blank_without_null...Traceback (most recent call last): File "/usr/local/lib/python3.11/dist-packages/netaddr/eui/__init__.py", line 427, in _set_value self._value = self._module.str_to_int(value) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/dist-packages/netaddr/strategy/eui48.py", line 176, in str_to_int raise AddrFormatError('%r is not a supported MAC format!' % (addr,)) netaddr.core.AddrFormatError: '' is not a supported MAC format! During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/lib/python3.11/dist-packages/macaddress/fields.py", line 76, in to_python return EUI(value, version=48, dialect=default_dialect()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/dist-packages/netaddr/eui/__init__.py", line 374, in __init__ self.value = addr ^^^^^^^^^^ File "/usr/local/lib/python3.11/dist-packages/netaddr/eui/__init__.py", line 429, in _set_value raise AddrFormatError( netaddr.core.AddrFormatError: address '' is not an EUIv48 During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/bin/aleksis-admin", line 8, in <module> sys.exit(aleksis_cmd()) ^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/dist-packages/aleksis/core/__main__.py", line 14, in aleksis_cmd execute_from_command_line(sys.argv) File "/usr/local/lib/python3.11/dist-packages/django/core/management/__init__.py", line 442, in execute_from_command_line utility.execute() File "/usr/local/lib/python3.11/dist-packages/django/core/management/__init__.py", line 436, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/usr/local/lib/python3.11/dist-packages/django/core/management/base.py", line 413, in run_from_argv self.execute(*args, **cmd_options) File "/usr/local/lib/python3.11/dist-packages/django/core/management/base.py", line 459, in execute output = self.handle(*args, **options) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/dist-packages/django/core/management/base.py", line 107, in wrapper res = handle_func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/dist-packages/django/core/management/commands/migrate.py", line 357, in handle post_migrate_state = executor.migrate( ^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/dist-packages/django/db/migrations/executor.py", line 135, in migrate state = self._migrate_all_forwards( ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/dist-packages/django/db/migrations/executor.py", line 167, in _migrate_all_forwards state = self.apply_migration( ^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/dist-packages/django/db/migrations/executor.py", line 255, in apply_migration state = migration.apply(state, schema_editor) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/dist-packages/django/db/migrations/migration.py", line 132, in apply operation.database_forwards( File "/usr/local/lib/python3.11/dist-packages/django/db/migrations/operations/fields.py", line 241, in database_forwards schema_editor.alter_field(from_model, from_field, to_field) File "/usr/local/lib/python3.11/dist-packages/django/db/backends/base/schema.py", line 905, in alter_field self._alter_field( File "/usr/local/lib/python3.11/dist-packages/django/db/backends/postgresql/schema.py", line 269, in _alter_field super()._alter_field( File "/usr/local/lib/python3.11/dist-packages/django/db/backends/base/schema.py", line 1132, in _alter_field new_default = self.effective_default(new_field) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/dist-packages/django/db/backends/base/schema.py", line 483, in effective_default return field.get_db_prep_save(self._effective_default(field), self.connection) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/dist-packages/django/db/models/fields/__init__.py", line 1008, in get_db_prep_save return self.get_db_prep_value(value, connection=connection, prepared=False) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/dist-packages/django/db/models/fields/__init__.py", line 1001, in get_db_prep_value value = self.get_prep_value(value) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/dist-packages/macaddress/fields.py", line 52, in get_prep_value value = self.to_python(value) ^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/dist-packages/macaddress/fields.py", line 78, in to_python raise ValidationError("This value must be a valid MAC address.") django.core.exceptions.ValidationError: ['This value must be a valid MAC address.'] ```
Author
Member

assigned to @hansegucker

assigned to @hansegucker
Owner

unassigned @hansegucker

unassigned @hansegucker
Author
Member
Fixed in https://edugit.org/AlekSIS/onboarding/AlekSIS-App-Kompjuter/-/merge_requests/33
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
aleksis/AlekSIS-App-Kompjuter#21
No description provided.