pretalx / pretalx-public-voting

Public community voting on talk proposals
Other
3 stars 5 forks source link

Error after installation: django.db.migrations.exceptions.NodeNotFoundError #5

Closed saschafoerster closed 4 years ago

saschafoerster commented 4 years ago

I added pretalx-public-voting to my Dockerfile

FROM pretalx/standalone:latest
USER root
RUN pip3 install pretalx-public-voting
USER pretalxuser

I built a new container from that: docker build -t bonndigital/pretalx .

And with docker-compose I successfully started pretalx with the plugin installed:

version: '2'
services:
  pretalx:
    # image: pretalx/standalone:latest
    image: bonndigital/pretalx
    #build: .
    container_name: pretalx
    restart: unless-stopped
    ports:
      - "8346:80"
    volumes:
      - /etc/pretalx/pretalx.cfg:/etc/pretalx/pretalx.cfg:ro
      - /var/pretalx-data:/data
      - /var/run/mysqld:/var/run/mysqld
      - /var/run/redis:/var/run/redis
    labels:
       traefik.docker.network: "pretalxdocker"
       traefik.enable: "true"

When I try to migrate and prepare databases I get this error: docker exec -it pretalx pretalx migrate

┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ ┏━━━━━━━━━━┓  pretalx v1.1.2                        ┃
┃ ┃  ┌─·──╮  ┃  Settings:  /etc/pretalx/pretalx.cfg   ┃
┃ ┃  │  O │  ┃  Database:  pretalx (mysql)            ┃
┃ ┃  │ ┌──╯  ┃  Logging:   /data/logs                 ┃
┃ ┃  └─┘     ┃  Root dir:  /pretalx/src/pretalx       ┃
┃ ┗━━━┯━┯━━━━┛  Python:    /usr/local/bin/python3     ┃
┃     ╰─╯       Plugins:   pretalx_public_voting      ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/local/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/pretalx/src/pretalx/__main__.py", line 9, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python3.6/site-packages/django/core/management/__init__.py", line 381, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python3.6/site-packages/django/core/management/__init__.py", line 375, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python3.6/site-packages/django/core/management/base.py", line 323, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/local/lib/python3.6/site-packages/django/core/management/base.py", line 364, in execute
    output = self.handle(*args, **options)
  File "/usr/local/lib/python3.6/site-packages/django/core/management/base.py", line 83, in wrapped
    res = handle_func(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/django/core/management/commands/migrate.py", line 87, in handle
    executor = MigrationExecutor(connection, self.migration_progress_callback)
  File "/usr/local/lib/python3.6/site-packages/django/db/migrations/executor.py", line 18, in __init__
    self.loader = MigrationLoader(self.connection)
  File "/usr/local/lib/python3.6/site-packages/django/db/migrations/loader.py", line 49, in __init__
    self.build_graph()
  File "/usr/local/lib/python3.6/site-packages/django/db/migrations/loader.py", line 274, in build_graph
    raise exc
  File "/usr/local/lib/python3.6/site-packages/django/db/migrations/loader.py", line 248, in build_graph
    self.graph.validate_consistency()
  File "/usr/local/lib/python3.6/site-packages/django/db/migrations/graph.py", line 195, in validate_consistency
    [n.raise_error() for n in self.node_map.values() if isinstance(n, DummyNode)]
  File "/usr/local/lib/python3.6/site-packages/django/db/migrations/graph.py", line 195, in <listcomp>
    [n.raise_error() for n in self.node_map.values() if isinstance(n, DummyNode)]
  File "/usr/local/lib/python3.6/site-packages/django/db/migrations/graph.py", line 58, in raise_error
    raise NodeNotFoundError(self.error_message, self.key, origin=self.origin)
django.db.migrations.exceptions.NodeNotFoundError: Migration pretalx_public_voting.0001_initial dependencies reference nonexistent parent node ('submission', '0046_question_submission_types')
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ ┏━━━━━━━━━━┓  pretalx v1.1.2                        ┃
┃ ┃  ┌─·──╮  ┃  Settings:  /etc/pretalx/pretalx.cfg   ┃
┃ ┃  │  O │  ┃  Database:  pretalx (mysql)            ┃
┃ ┃  │ ┌──╯  ┃  Logging:   /data/logs                 ┃
┃ ┃  └─┘     ┃  Root dir:  /pretalx/src/pretalx       ┃
┃ ┗━━━┯━┯━━━━┛  Python:    /usr/local/bin/python3     ┃
┃     ╰─╯       Plugins:   pretalx_public_voting      ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/local/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/pretalx/src/pretalx/__main__.py", line 9, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python3.6/site-packages/django/core/management/__init__.py", line 381, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python3.6/site-packages/django/core/management/__init__.py", line 375, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python3.6/site-packages/django/core/management/base.py", line 323, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/local/lib/python3.6/site-packages/django/core/management/base.py", line 364, in execute
    output = self.handle(*args, **options)
  File "/usr/local/lib/python3.6/site-packages/django/core/management/base.py", line 83, in wrapped
    res = handle_func(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/django/core/management/commands/migrate.py", line 87, in handle
    executor = MigrationExecutor(connection, self.migration_progress_callback)
  File "/usr/local/lib/python3.6/site-packages/django/db/migrations/executor.py", line 18, in __init__
    self.loader = MigrationLoader(self.connection)
  File "/usr/local/lib/python3.6/site-packages/django/db/migrations/loader.py", line 49, in __init__
    self.build_graph()
  File "/usr/local/lib/python3.6/site-packages/django/db/migrations/loader.py", line 274, in build_graph
    raise exc
  File "/usr/local/lib/python3.6/site-packages/django/db/migrations/loader.py", line 248, in build_graph
    self.graph.validate_consistency()
  File "/usr/local/lib/python3.6/site-packages/django/db/migrations/graph.py", line 195, in validate_consistency
    [n.raise_error() for n in self.node_map.values() if isinstance(n, DummyNode)]
  File "/usr/local/lib/python3.6/site-packages/django/db/migrations/graph.py", line 195, in <listcomp>
    [n.raise_error() for n in self.node_map.values() if isinstance(n, DummyNode)]
  File "/usr/local/lib/python3.6/site-packages/django/db/migrations/graph.py", line 58, in raise_error
    raise NodeNotFoundError(self.error_message, self.key, origin=self.origin)
django.db.migrations.exceptions.NodeNotFoundError: Migration pretalx_public_voting.0001_initial dependencies reference nonexistent parent node ('submission', '0046_question_submission_types')
rixx commented 4 years ago

pretalx-public-voting is currently under development and not ready for production use. It only works with the development version of pretalx and even then is in no shape to be used at this point.