#24262: TypeError: unhashable type: 'bytearray'
----------------------------+--------------------------------------
Reporter: pkreker | Owner: nobody
Type: Bug | Status: new
Component: Migrations | Version: 1.7
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
----------------------------+--------------------------------------
Description changed by pkreker:
Old description:
> I just created a new project and followed the tutorial, when i got this:
>
> {{{
> (env) paul@Kreker-Server:~/public_html/p_kreker$ python manage.py migrate
> Operations to perform:
> Apply all migrations: auth, sessions, contenttypes, admin
> Running migrations:
> Applying contenttypes.0001_initial... OK
> Applying auth.0001_initial... OK
> Applying admin.0001_initial... OK
> Applying sessions.0001_initial... OK
> Traceback (most recent call last):
> File "manage.py", line 10, in <module>
> execute_from_command_line(sys.argv)
> File "/home/paul/public_html/p_kreker/env/lib/python3.4/site-
> packages/django/core/management/__init__.py", line 385, in
> execute_from_command_line
> utility.execute()
> File "/home/paul/public_html/p_kreker/env/lib/python3.4/site-
> packages/django/core/management/__init__.py", line 377, in execute
> self.fetch_command(subcommand).run_from_argv(self.argv)
> File "/home/paul/public_html/p_kreker/env/lib/python3.4/site-
> packages/django/core/management/base.py", line 288, in run_from_argv
> self.execute(*args, **options.__dict__)
> File "/home/paul/public_html/p_kreker/env/lib/python3.4/site-
> packages/django/core/management/base.py", line 338, in execute
> output = self.handle(*args, **options)
> File "/home/paul/public_html/p_kreker/env/lib/python3.4/site-
> packages/django/core/management/commands/migrate.py", line 165, in handle
> emit_post_migrate_signal(created_models, self.verbosity,
> self.interactive, connection.alias)
> File "/home/paul/public_html/p_kreker/env/lib/python3.4/site-
> packages/django/core/management/sql.py", line 268, in
> emit_post_migrate_signal
> using=db)
> File "/home/paul/public_html/p_kreker/env/lib/python3.4/site-
> packages/django/dispatch/dispatcher.py", line 198, in send
> response = receiver(signal=self, sender=sender, **named)
> File "/home/paul/public_html/p_kreker/env/lib/python3.4/site-
> packages/django/contrib/auth/management/__init__.py", line 64, in
> create_permissions
> if not is_latest_migration_applied('auth'):
> File "/home/paul/public_html/p_kreker/env/lib/python3.4/site-
> packages/django/db/migrations/loader.py", line 292, in
> is_latest_migration_applied
> loader = MigrationLoader(connection)
> File "/home/paul/public_html/p_kreker/env/lib/python3.4/site-
> packages/django/db/migrations/loader.py", line 49, in __init__
> self.build_graph()
> File "/home/paul/public_html/p_kreker/env/lib/python3.4/site-
> packages/django/db/migrations/loader.py", line 184, in build_graph
> self.applied_migrations = recorder.applied_migrations()
> File "/home/paul/public_html/p_kreker/env/lib/python3.4/site-
> packages/django/db/migrations/recorder.py", line 60, in
> applied_migrations
> return set(tuple(x) for x in self.migration_qs.values_list("app",
> "name"))
> TypeError: unhashable type: 'bytearray'
> }}}
>
> settings.py:
>
> {{{
> """
> Django settings for p_kreker project.
>
> For more information on this file, see
> https://docs.djangoproject.com/en/1.7/topics/settings/
>
> For the full list of settings and their values, see
> https://docs.djangoproject.com/en/1.7/ref/settings/
> """
>
> # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
> import os
> BASE_DIR = os.path.dirname(os.path.dirname(__file__))
>
> # Quick-start development settings - unsuitable for production
> # See https://docs.djangoproject.com/en/1.7/howto/deployment/checklist/
>
> # SECURITY WARNING: keep the secret key used in production secret!
> SECRET_KEY = '@l)bvja@q45ud2d813g*i+n2=1#kbf#nzqm6()c)dv116pqq^p'
>
> # SECURITY WARNING: don't run with debug turned on in production!
> DEBUG = True
>
> TEMPLATE_DEBUG = True
>
> ALLOWED_HOSTS = []
>
> # Application definition
>
> INSTALLED_APPS = (
> 'django.contrib.admin',
> 'django.contrib.auth',
> 'django.contrib.contenttypes',
> 'django.contrib.sessions',
> 'django.contrib.messages',
> 'django.contrib.staticfiles',
> )
>
> MIDDLEWARE_CLASSES = (
> 'django.contrib.sessions.middleware.SessionMiddleware',
> 'django.middleware.common.CommonMiddleware',
> 'django.middleware.csrf.CsrfViewMiddleware',
> 'django.contrib.auth.middleware.AuthenticationMiddleware',
> 'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
> 'django.contrib.messages.middleware.MessageMiddleware',
> 'django.middleware.clickjacking.XFrameOptionsMiddleware',
> )
>
> ROOT_URLCONF = 'p_kreker.urls'
>
> WSGI_APPLICATION = 'p_kreker.wsgi.application'
>
> # Database
> # https://docs.djangoproject.com/en/1.7/ref/settings/#databases
>
> DATABASES = {
> 'default': {
> 'NAME': 'p_kreker',
> 'ENGINE': 'mysql.connector.django',
> 'USER': 'paul',
> 'PASSWORD': 'm2aJup2fHYDdArGT',
> 'OPTIONS': {
> 'autocommit': True,
> },
> }
> }
>
> # Internationalization
> # https://docs.djangoproject.com/en/1.7/topics/i18n/
>
> LANGUAGE_CODE = 'de-de'
>
> TIME_ZONE = 'Europe/Berlin'
>
> USE_I18N = True
>
> USE_L10N = True
>
> USE_TZ = True
>
> # Static files (CSS, JavaScript, Images)
> # https://docs.djangoproject.com/en/1.7/howto/static-files/
>
> STATIC_URL = '/static/'
> }}}
>
> I'm using python-3.4, django-1.7.4 and for the SQL connection mysql-
> connector-python-2.0.2. For this project I've created a virtual
> environment with the python 3 venv.
New description:
I just created a new project and followed the tutorial, when i got this:
{{{
(env) paul@Kreker-Server:~/public_html/p_kreker$ python manage.py migrate
Operations to perform:
Apply all migrations: auth, sessions, contenttypes, admin
Running migrations:
Applying contenttypes.0001_initial... OK
Applying auth.0001_initial... OK
Applying admin.0001_initial... OK
Applying sessions.0001_initial... OK
Traceback (most recent call last):
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/home/paul/public_html/p_kreker/env/lib/python3.4/site-
packages/django/core/management/__init__.py", line 385, in
execute_from_command_line
utility.execute()
File "/home/paul/public_html/p_kreker/env/lib/python3.4/site-
packages/django/core/management/__init__.py", line 377, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/paul/public_html/p_kreker/env/lib/python3.4/site-
packages/django/core/management/base.py", line 288, in run_from_argv
self.execute(*args, **options.__dict__)
File "/home/paul/public_html/p_kreker/env/lib/python3.4/site-
packages/django/core/management/base.py", line 338, in execute
output = self.handle(*args, **options)
File "/home/paul/public_html/p_kreker/env/lib/python3.4/site-
packages/django/core/management/commands/migrate.py", line 165, in handle
emit_post_migrate_signal(created_models, self.verbosity,
self.interactive, connection.alias)
File "/home/paul/public_html/p_kreker/env/lib/python3.4/site-
packages/django/core/management/sql.py", line 268, in
emit_post_migrate_signal
using=db)
File "/home/paul/public_html/p_kreker/env/lib/python3.4/site-
packages/django/dispatch/dispatcher.py", line 198, in send
response = receiver(signal=self, sender=sender, **named)
File "/home/paul/public_html/p_kreker/env/lib/python3.4/site-
packages/django/contrib/auth/management/__init__.py", line 64, in
create_permissions
if not is_latest_migration_applied('auth'):
File "/home/paul/public_html/p_kreker/env/lib/python3.4/site-
packages/django/db/migrations/loader.py", line 292, in
is_latest_migration_applied
loader = MigrationLoader(connection)
File "/home/paul/public_html/p_kreker/env/lib/python3.4/site-
packages/django/db/migrations/loader.py", line 49, in __init__
self.build_graph()
File "/home/paul/public_html/p_kreker/env/lib/python3.4/site-
packages/django/db/migrations/loader.py", line 184, in build_graph
self.applied_migrations = recorder.applied_migrations()
File "/home/paul/public_html/p_kreker/env/lib/python3.4/site-
packages/django/db/migrations/recorder.py", line 60, in applied_migrations
return set(tuple(x) for x in self.migration_qs.values_list("app",
"name"))
TypeError: unhashable type: 'bytearray'
}}}
I'm using python-3.4, django-1.7.4 and for the SQL connection mysql-
connector-python-2.0.2. For this project I've created a virtual
environment with the python 3 venv.
--
--
Ticket URL: <https://code.djangoproject.com/ticket/24262#comment:2>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/065.00a76123422f865cdff21dfb79eca96f%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.