Frappe Insights - Installation Thread

Hi all,

There seem to be some common installation problems with Frappe Insights causing those of us who want to evaluate it, to fall at the first hurdle.

…which is not a slight on the product since the product is basically in beta still. But please understand that many of us here in the community cannot yet commit to going onto Frappe Cloud and without a solid BI/analytics tool we cannot fully sell the entire Frappe solution.

There is a useful thread on the Telegram group (Telegram: Contact @frappeinsights) but it’s a bit repetitious and some of the answers are best stored here.

Would it be ok if we begin a Frappe Insights thread herewith and possibly even a tag?

In the meantime I will begin with the installation problem I have had so far:

bench get-app
eventually does a bench build which runs for a while and then fails on

$ supervisorctl restart frappe:
error: <class ‘PermissionError’>, [Errno 13] Permission denied: file: /usr/lib/python3/dist-packages/supervisor/ line: 560
Traceback (most recent call last):
File “/usr/local/bin/bench”, line 8, in
File “/usr/local/lib/python3.10/dist-packages/bench/”, line 127, in cli
File “/usr/lib/python3/dist-packages/click/”, line 1128, in call
return self.main(*args, **kwargs)
File “/usr/lib/python3/dist-packages/click/”, line 1053, in main
rv = self.invoke(ctx)
File “/usr/lib/python3/dist-packages/click/”, line 1659, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/lib/python3/dist-packages/click/”, line 1395, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/lib/python3/dist-packages/click/”, line 754, in invoke
return __callback(*args, **kwargs)
File “/usr/local/lib/python3.10/dist-packages/bench/commands/”, line 159, in get_app
File “/usr/local/lib/python3.10/dist-packages/bench/”, line 444, in get_app
app.install(verbose=verbose, skip_assets=skip_assets, restart_bench=restart_bench)
File “/usr/local/lib/python3.10/dist-packages/bench/utils/”, line 126, in wrapper_fn
return fn(*args, **kwargs)
File “/usr/local/lib/python3.10/dist-packages/bench/”, line 242, in install
File “/usr/local/lib/python3.10/dist-packages/bench/”, line 589, in install_app
File “/usr/local/lib/python3.10/dist-packages/bench/utils/”, line 126, in wrapper_fn
return fn(*args, **kwargs)
File “/usr/local/lib/python3.10/dist-packages/bench/”, line 151, in reload
restart_supervisor_processes(, web_workers=web)
File “/usr/local/lib/python3.10/dist-packages/bench/utils/”, line 304, in restart_supervisor_processes"{sudo}supervisorctl restart {group}")
File “/usr/local/lib/python3.10/dist-packages/bench/”, line 48, in run
return exec_cmd(cmd, cwd=cwd or self.cwd)
File “/usr/local/lib/python3.10/dist-packages/bench/utils/”, line 155, in exec_cmd
raise CommandFailedError

From the telegram thread i discerned this might be something to do with how bench was installed and there was a comment to reinstall bench. I wanted to check whether this was indeed the case before committing to that. Or whether there is a cleverer way out…


This seems some permission error while running supervisor cmd. Not related to Insights
I’ll make a docker installation guide soon, I hope that will help

Thanks Saqib that will be very welcome!

Since posting this I was able to fix the problem with the following contribution from a seemingly related thread:

Effectively a permission error as you say!

Now I am faced with an error in the next step when doing the bench install-app insights

ubuntu@vps-f5da0f99:~/frappe-bench$ bench --site install-app insights

Installing insights…
Updating DocTypes for insights : [== ] 14%An error occurred while installing insights: Module import failed for Insights Query (insights.insights.doctype.insights_query.insights_query Error: cannot import name ‘task’ from ‘frappe’ (/home/ubuntu/frappe-bench/apps/frappe/frappe/
Traceback (most recent call last):

I am seeing this import error type mentioned in other threads related to installing custom apps but nothing related to task or Insights.

Any help here would be appreciated.



Use version-14 branch of frappe, it will resolve the issue

Here are the steps to install with docker

1 Like


To checkout frappe insights without any installation problem

1 Like