Bug description

Steps to reproduce

  • Uncertain if relevant: create a custom theme according to the theming guide.
  • Export a dashboard
  • Try to import it

Additional information

  • Using docker: apache/superset:6.0.0rc1

Thanks a lot for your awesome FOSS.

Screenshots/recordings

No response

Superset version

master / latest-dev

Python version

3.10

Node version

?

Browser

Firefox

Additional context

Error stack

2025-09-17 15:51:20,455:WARNING:superset.commands.importers.v1:Import Error: {'theme_id': ['Unknown field.']}
2025-09-17 15:51:20,456:INFO:superset.commands.dashboard.importers.dispatcher:Command failed validation
2025-09-17 15:51:20,456:WARNING:superset.views.error_handling:CommandException
Traceback (most recent call last):
  File "/app/.venv/lib/python3.10/site-packages/flask/app.py", line 1484, in full_dispatch_request
    rv = self.dispatch_request()
  File "/app/.venv/lib/python3.10/site-packages/flask/app.py", line 1469, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
  File "/app/.venv/lib/python3.10/site-packages/flask_appbuilder/security/decorators.py", line 109, in wraps
    return f(self, *args, **kwargs)
  File "/app/superset/views/base_api.py", line 120, in wraps
    duration, response = time_function(f, self, *args, **kwargs)
  File "/app/superset/utils/core.py", line 1409, in time_function
    response = func(*args, **kwargs)
  File "/app/superset/utils/log.py", line 304, in wrapper
    value = f(*args, **kwargs)
  File "/app/superset/views/base_api.py", line 107, in wraps
    return f(self, *args, **kwargs)
  File "/app/superset/dashboards/api.py", line 1595, in import_
    command.run()
  File "/app/superset/commands/dashboard/importers/dispatcher.py", line 57, in run
    command.run()
  File "/app/superset/utils/decorators.py", line 267, in wrapped
    return on_error(ex)
  File "/app/superset/utils/decorators.py", line 232, in on_error
    raise ex
  File "/app/superset/utils/decorators.py", line 260, in wrapped
    result = func(*args, **kwargs)
  File "/app/superset/commands/importers/v1/__init__.py", line 84, in run
    self.validate()
  File "/app/superset/commands/importers/v1/__init__.py", line 120, in validate
    raise CommandInvalidError(
superset.commands.exceptions.CommandInvalidError: Error importing dashboard

superset_config.py

"""Superset configuration."""

import os


SUPERSET_DB_USER = os.getenv('SUPERSET_DB_USER', 'superset')
SUPERSET_DB_PASSWORD = os.getenv('SUPERSET_DB_PASSWORD', 'superset')
SUPERSET_DB_NAME = os.getenv('SUPERSET_DB_NAME', 'superset')

SQLALCHEMY_DATABASE_URI = (
    f'postgresql+psycopg2://{SUPERSET_DB_USER}:{SUPERSET_DB_PASSWORD}@superset-db:5432/{SUPERSET_DB_NAME}'
)

FEATURE_FLAGS = {
    'ENABLE_TEMPLATE_PROCESSING': True,
    'EXTRA_CATEGORICAL_COLOR_SCHEMES': True,
}


ENABLE_PROXY_FIX = True


# Theme configuration
FAVICONS = [{'href': '/static/assets/images/favicon.ico', 'type': 'image/x-icon'}]
APP_NAME = 'Dashboard'
LOGO_TARGET_PATH = '/'
LOGO_TOOLTIP = APP_NAME

EXTRA_CATEGORICAL_COLOR_SCHEMES = [
    {
...
    },
    {
...
    },
]

THEME_DEFAULT = {
    'token': {
...
    }
}

THEME_DARK = {
    'token': {
...
    },
    'algorithm': 'dark',
}

Checklist

  • [x] I have searched Superset docs and Slack and didn't find a solution to my problem.
  • [x] I have searched the GitHub issue tracker and didn't find a similar bug report.
  • [x] I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.

Comment From: dosubot[bot]

Hi @maxfrei750! I'm Dosu and I’m helping the superset team.

The import error with {'theme_id': ['Unknown field.']} in Superset 6.0.0rc1 is caused by a schema mismatch: the import process doesn't recognize the theme_id field in dashboard exports. This happens because the export/import logic for dashboards with custom themes was incomplete in that release.

A recent fix (PR #34850)—merged after 6.0.0rc1—completely overhauled theme import/export. Now, dashboards export a theme_uuid (not theme_id), and the import process maps this UUID to the correct theme ID, auto-bundling themes for portability and providing a graceful fallback if a theme is missing. This resolves the "unknown field" error and makes dashboard import/export with custom themes robust and portable.

To resolve your issue, upgrade to a Superset version that includes this fix (any build after September 1, 2025). As a temporary workaround, you could try editing your export files to use theme_uuid instead of theme_id, but the upgrade is the recommended and supported solution.

More details on the fix and new behavior are in PR #34850.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Chat with Dosu Join Discord Share on X

Comment From: sadpandajoe

This potentially may be fixed as part of https://github.com/apache/superset/pull/34850, we should confirm once RC2 is cut which is when all blockers have been resolved.

Comment From: maxfrei750

I'll try to test the most recent docker tag asap.

Comment From: maxfrei750

Is there a place where I can see/track the progress towards rc2?

Comment From: mistercrunch

Is there a place where I can see/track the progress towards rc2?

Probably best place is the release branch itself and looking for PRs with v6.0 (tagged to become 🍒 )

Comment From: mistercrunch

If you're like really curious you can check out https://github.com/mistercrunch/cherrytree2, using the tool to help track/package releases. It's pretty neat but needs some more ❤️

Comment From: maxfrei750

I can confirm that the bug no longer exists in fd6da21ce0bb74e94a8be1f11c79005dd26e68a7. Therefore, I'll close here. I'd like to compliment the swift resolution and the extremely helpful answers, both of the human and non-human collaborators. 😄

Comment From: sadpandajoe

Is there a place where I can see/track the progress towards rc2?

From the email we sent out, we also have a board to track bugs for releases. You can see the 6.0 one here: https://github.com/orgs/apache/projects/517. The next RC will be created once all blockers are done and cherried.