Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import of organization dump has failed: KeyError: 'notifications_stream' #30045

Closed
2 of 6 tasks
ChronosXYZ opened this issue May 10, 2024 · 1 comment
Closed
2 of 6 tasks
Labels

Comments

@ChronosXYZ
Copy link

ChronosXYZ commented May 10, 2024

I'm trying to import the organization dump I exported from *.zulipchat.com. But it fails for some reason. I am using official docker-zulip image of version 8.4.

The backtrace:

Processing dump: /tmp/zulip-export-xxxx_xxx ...
2024-05-10 15:36:56.643 INFO [] Importing realm dump /tmp/zulip-export-xxxx_xxx
2024-05-10 15:36:56.645 INFO [] Importing realm data from /tmp/zulip-export-xxxx_xxx/realm.json
Traceback (most recent call last):
  File "/home/zulip/deployments/current/manage.py", line 151, in <module>
    execute_from_command_line(sys.argv)
  File "/home/zulip/deployments/current/manage.py", line 116, in execute_from_command_line
    utility.execute()
  File "/srv/zulip-venv-cache/bbd84a06bc651effedfe39cab337a1bf300cee02/zulip-py3-venv/lib/python3.8/site-packages/django/core/management/__init__.py", line 436, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/srv/zulip-venv-cache/bbd84a06bc651effedfe39cab337a1bf300cee02/zulip-py3-venv/lib/python3.8/site-packages/django/core/management/base.py", line 412, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/srv/zulip-venv-cache/bbd84a06bc651effedfe39cab337a1bf300cee02/zulip-py3-venv/lib/python3.8/site-packages/django/core/management/base.py", line 458, in execute
    output = self.handle(*args, **options)
  File "/home/zulip/deployments/2024-05-09-18-59-10/zerver/management/commands/import.py", line 106, in handle
    do_import_realm(path, subdomain, num_processes)
  File "/home/zulip/deployments/2024-05-09-18-59-10/zerver/lib/import_realm.py", line 959, in do_import_realm
    re_map_foreign_keys(data, "zerver_realm", "notifications_stream", related_table="stream")
  File "/home/zulip/deployments/2024-05-09-18-59-10/zerver/lib/import_realm.py", line 462, in re_map_foreign_keys
    re_map_foreign_keys_internal(
  File "/home/zulip/deployments/2024-05-09-18-59-10/zerver/lib/import_realm.py", line 493, in re_map_foreign_keys_internal
    old_id = item[field_name]
KeyError: 'notifications_stream'

Zulip Server and web app version:

  • Zulip Cloud (*.zulipchat.com)
  • Zulip Server 8.0+
  • Zulip Server 7.0+
  • Zulip Server 6.0+
  • Zulip Server 5.0 or older
  • Other or not sure
@ChronosXYZ ChronosXYZ added the bug label May 10, 2024
@ChronosXYZ ChronosXYZ changed the title Import organization failed Import organization has failed: KeyError: 'notifications_stream' May 10, 2024
@ChronosXYZ ChronosXYZ changed the title Import organization has failed: KeyError: 'notifications_stream' Import organization dump has failed: KeyError: 'notifications_stream' May 10, 2024
@ChronosXYZ ChronosXYZ changed the title Import organization dump has failed: KeyError: 'notifications_stream' Import of organization dump has failed: KeyError: 'notifications_stream' May 10, 2024
@alya
Copy link
Contributor

alya commented May 14, 2024

Please drop by the #production help stream in the Zulip development community to get help with your issue.

@alya alya closed this as not planned Won't fix, can't repro, duplicate, stale May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants