You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ nautobot-server dumpdata \
> --natural-foreign \
> --natural-primary \
> --exclude contenttypes \
> --exclude auth.permission \
> --exclude extras.job \
> --format json \
> --indent 2 \
> --traceback > nautobot_dump.json
Traceback (most recent call last):
File "/opt/nautobot/lib/python3.8/site-packages/django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
File "/opt/nautobot/lib/python3.8/site-packages/django/db/backends/mysql/base.py", line 73, in execute
return self.cursor.execute(query, args)
File "/opt/nautobot/lib/python3.8/site-packages/MySQLdb/cursors.py", line 206, in execute
res = self._query(query)
File "/opt/nautobot/lib/python3.8/site-packages/MySQLdb/cursors.py", line 319, in _query
db.query(q)
File "/opt/nautobot/lib/python3.8/site-packages/MySQLdb/connections.py", line 254, in query
_mysql.connection.query(self, query)
MySQLdb._exceptions.ProgrammingError: (1146, "Table 'nautobot.django_rq_queue' doesn't exist")
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/opt/nautobot/bin/nautobot-server", line 8, in <module>
sys.exit(main())
File "/opt/nautobot/lib/python3.8/site-packages/nautobot/core/cli.py", line 54, in main
run_app(
File "/opt/nautobot/lib/python3.8/site-packages/nautobot/core/runner/runner.py", line 266, in run_app
management.execute_from_command_line([runner_name, command] + command_args)
File "/opt/nautobot/lib/python3.8/site-packages/django/core/management/__init__.py", line 419, in execute_from_command_line
utility.execute()
File "/opt/nautobot/lib/python3.8/site-packages/django/core/management/__init__.py", line 413, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/opt/nautobot/lib/python3.8/site-packages/django/core/management/base.py", line 354, in run_from_argv
self.execute(*args, **cmd_options)
File "/opt/nautobot/lib/python3.8/site-packages/django/core/management/base.py", line 398, in execute
output = self.handle(*args, **options)
File "/opt/nautobot/lib/python3.8/site-packages/django/core/management/commands/dumpdata.py", line 232, in handle
serializers.serialize(
File "/opt/nautobot/lib/python3.8/site-packages/django/core/serializers/__init__.py", line 129, in serialize
s.serialize(queryset, **options)
File "/opt/nautobot/lib/python3.8/site-packages/django/core/serializers/base.py", line 90, in serialize
for count, obj in enumerate(queryset, start=1):
File "/opt/nautobot/lib/python3.8/site-packages/django/core/management/commands/dumpdata.py", line 191, in get_objects
yield from queryset.iterator()
File "/opt/nautobot/lib/python3.8/site-packages/django/db/models/query.py", line 353, in _iterator
yield from self._iterable_class(self, chunked_fetch=use_chunked_fetch, chunk_size=chunk_size)
File "/opt/nautobot/lib/python3.8/site-packages/django/db/models/query.py", line 51, in __iter__
results = compiler.execute_sql(chunked_fetch=self.chunked_fetch, chunk_size=self.chunk_size)
File "/opt/nautobot/lib/python3.8/site-packages/django/db/models/sql/compiler.py", line 1175, in execute_sql
cursor.execute(sql, params)
File "/opt/nautobot/lib/python3.8/site-packages/cacheops/transaction.py", line 97, in execute
result = self._no_monkey.execute(self, sql, params)
File "/opt/nautobot/lib/python3.8/site-packages/django/db/backends/utils.py", line 66, in execute
return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
File "/opt/nautobot/lib/python3.8/site-packages/django/db/backends/utils.py", line 75, in _execute_with_wrappers
return executor(sql, params, many, context)
File "/opt/nautobot/lib/python3.8/site-packages/django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
File "/opt/nautobot/lib/python3.8/site-packages/django/db/utils.py", line 90, in __exit__
raise dj_exc_value.with_traceback(traceback) from exc_value
File "/opt/nautobot/lib/python3.8/site-packages/django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
File "/opt/nautobot/lib/python3.8/site-packages/django/db/backends/mysql/base.py", line 73, in execute
return self.cursor.execute(query, args)
File "/opt/nautobot/lib/python3.8/site-packages/MySQLdb/cursors.py", line 206, in execute
res = self._query(query)
File "/opt/nautobot/lib/python3.8/site-packages/MySQLdb/cursors.py", line 319, in _query
db.query(q)
File "/opt/nautobot/lib/python3.8/site-packages/MySQLdb/connections.py", line 254, in query
_mysql.connection.query(self, query)
django.db.utils.ProgrammingError: (1146, "Table 'nautobot.django_rq_queue' doesn't exist")
Looks like we need to update our docs (extras.job should be included now) but django-rq@2.5.0 introduced an unmanaged model called Queue.
We will be updating our documentation (and our invoke command) but in the mean time, pass --exclude django_rq as well remove --exclude extras.job.
Before
root@e8a0d24ad588:/source# nautobot-server dumpdata --exclude extras.job --indent 4 --output db_output.json --format jsonCommandError: Unable to serialize database: relation "django_rq_queue" does not exist
LINE 1: SELECT COUNT(*) AS "__count" FROM "django_rq_queue"
Environment
Steps to Reproduce
Follow the standard installation process for an Ubuntu 20.04 server:
Expected Behavior
A json dump file will be created.
Observed Behavior
Traceback:
=>
django.db.utils.ProgrammingError: (1146, "Table 'nautobot.django_rq_queue' doesn't exist")
Nautobot has been installed with Celery, but not RQ, because RQ has been deprecated in Nautobot.
The text was updated successfully, but these errors were encountered: