Error on importing dashboard in Cairn (Tutor v19.0.4)

Hi everyone,

I have recently installed Cairn with Tutor v19.0.4 and I’m testing the dashboard export/import functionality. I haven’t made any changes in the Cairn configuration.

Here’s what I did:

  1. Created an admin account for Cairn plugin.

  2. Attached the default dashboard (Course overview) to it.

  3. Exported this default dashboard (from UI).

  4. Tried to import the same dashboard back into the same account (just for testing).

When I try to import the dashboard, I face this error:

cairn-superset-1              | /app/superset/commands/importers/v1/utils.py:132: SAWarning: TypeDecorator EncryptedType() will not produce a cache key because the ``cache_ok`` attribute is not set to True.  This can have significant performance implications including some performance degradations in comparison to prior SQLAlchemy versions.  Set this attribute to True if this type object's state is safe to use in a cache key, or False to disable this warning. (Background on this error at: https://sqlalche.me/e/14/cprf)
cairn-superset-1              |   ).all()
cairn-superset-1              | Command failed validation
cairn-superset-1              | CommandException
cairn-superset-1              | Traceback (most recent call last):
cairn-superset-1              |   File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 1823, in full_dispatch_request
cairn-superset-1              |     rv = self.dispatch_request()
cairn-superset-1              |   File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 1799, in dispatch_request
cairn-superset-1              |     return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
cairn-superset-1              |   File "/usr/local/lib/python3.10/site-packages/flask_appbuilder/security/decorators.py", line 95, in wraps
cairn-superset-1              |     return f(self, *args, **kwargs)
cairn-superset-1              |   File "/app/superset/views/base_api.py", line 127, in wraps
cairn-superset-1              |     raise ex
cairn-superset-1              |   File "/app/superset/views/base_api.py", line 121, in wraps
cairn-superset-1              |     duration, response = time_function(f, self, *args, **kwargs)
cairn-superset-1              |   File "/app/superset/utils/core.py", line 1463, in time_function
cairn-superset-1              |     response = func(*args, **kwargs)
cairn-superset-1              |   File "/app/superset/utils/log.py", line 255, in wrapper
cairn-superset-1              |     value = f(*args, **kwargs)
cairn-superset-1              |   File "/app/superset/views/base_api.py", line 108, in wraps
cairn-superset-1              |     return f(self, *args, **kwargs)
cairn-superset-1              |   File "/app/superset/dashboards/api.py", line 1135, in import_
cairn-superset-1              |     command.run()
cairn-superset-1              |   File "/app/superset/commands/dashboard/importers/dispatcher.py", line 64, in run
cairn-superset-1              |     raise exc
cairn-superset-1              |   File "/app/superset/commands/dashboard/importers/dispatcher.py", line 57, in run
cairn-superset-1              |     command.run()
cairn-superset-1              |   File "/app/superset/commands/importers/v1/__init__.py", line 71, in run
cairn-superset-1              |     self.validate()
cairn-superset-1              |   File "/app/superset/commands/importers/v1/__init__.py", line 109, in validate
cairn-superset-1              |     raise CommandInvalidError(
cairn-superset-1              | superset.commands.exceptions.CommandInvalidError: Error importing dashboard
cairn-superset-1              | 2025-08-26 12:34:37,515:INFO:werkzeug:172.18.0.1 - - [26/Aug/2025 12:34:37] "POST /api/v1/dashboard/import/ HTTP/1.1" 422 -

My goal is to be able to share dashboards with different users:

  1. Some users should only have read-only access (they should not be able to modify the dashboard).

  2. A few users should be able to contribute to the same dashboard.

Questions

  • Is dashboard re-import supposed to work in the same account, or is there a limitation here?

  • What’s the recommended way to share dashboards with read-only users vs. contributors?

  • Am I missing any configuration or permission setup for this to work correctly?

Thanks in advance for your guidance!

Hi @Yogesh, thank you for reporting this issue and for the very detailed logs.

I tested this out on my end, and I am getting a similar error. However, I created a new dashboard and exported it, then imported it back and that worked fine.

It seems that this error occurs for the default dashboard only, probably because we use some unorthodox tricks to create it in the first place.

We will look into this and see if we can come up with a fix.

Is dashboard re-import supposed to work in the same account, or is there a limitation here?

It should and is working but seems to be crashing for the default dashboard.

What’s the recommended way to share dashboards with read-only users vs. contributors?

You can change the role of their user to Gamma which gives them limited access. You can also create custom roles and assign them to users. Alternatively, you can limit access to courses using the cairn commands as mentioned here.

Hi @Danyal_Faheem !

Thanks for your reply.

I will definitely try this out.

I tried several combinations of removing charts one by one and then performing the export-import process. It worked when the dashboard only contained these specific charts.

I thought this might be helpful for you guys during debugging.
Here is the screenshot it. (When I only have these charts in the default dashboard, import works without error)

I’m super happy you were able to get it to work.

We’ll definitely use your findings to debug this further.