I Can't follow the documentation. I can't see the entry in the menue? Should the Admin see this?
I have a local installation and admin rights.
Or is it a bug?
Issue-Label Bot is automatically applying the label #question
to this issue, with a confidence of 0.90. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!
Links: app homepage, dashboard and code for this bot.
You need to set ENABLE_SCHEDULED_EMAIL_REPORTS = True
in your config.py file
I tried it. I have inserted ENABLE_SCHEDULED_EMAIL_REPORTS = True, but the menu items are still not displayed.
Same problem: ENABLE_SCHEDULED_EMAIL_REPORTS = True
inserts the divider, but "Dashboard Email Schedules" and "Chart Emails" are not visible.
I am unable to reproduce the error locally on admin account on master; have you tried this on either 0.34 or master and followed the upgrade instructions?
@sandy-ha please run superset init
again in terminal, because FAB(FlaskAppbuilder) will initialize reporter menu access permission
@zhaoyongjie, thank you. It works
return self.run(*args, **kwargs)
File "/home/superset/superset/tasks/schedules.py", line 386, in schedule_email_report
deliver_slice(schedule)
File "/home/superset/superset/tasks/schedules.py", line 350, in deliver_slice
email = _get_slice_data(schedule)
File "/home/superset/superset/tasks/schedules.py", line 277, in _get_slice_data
response = opener.open(slice_url)
File "/usr/local/lib/python3.6/urllib/request.py", line 532, in open
response = meth(req, response)
File "/usr/local/lib/python3.6/urllib/request.py", line 642, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/local/lib/python3.6/urllib/request.py", line 570, in error
return self._call_chain(args)
File "/usr/local/lib/python3.6/urllib/request.py", line 504, in _call_chain
result = func(args)
File "/usr/local/lib/python3.6/urllib/request.py", line 650, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
OSError
Mail can't be sent out
This is my setup
WEBDRIVER_BASEURL = "http://chrome:4444/wd/hub"
EMAIL_REPORTS_WEBDRIVER = "chrome"
class CustomCeleryConfig(object):
BROKER_URL = 'redis://%s:%s/0' % (REDIS_HOST, REDIS_PORT)
CELERY_IMPORTS = ('superset.sql_lab', )
CELERY_RESULT_BACKEND = 'redis://%s:%s/1' % (REDIS_HOST, REDIS_PORT)
CELERY_ANNOTATIONS = {'tasks.add': {'rate_limit': '10/s'}}
CELERY_TASK_PROTOCOL = 1
CELERY_ANNOTATIONS = {
"sql_lab.get_sql_results": {"rate_limit": "100/s"},
"email_reports.send": {
"rate_limit": "1/s",
"time_limit": 120,
"soft_time_limit": 150,
"ignore_result": True,
},
}
CELERYBEAT_SCHEDULE = {
"email_reports.schedule_hourly": {
"task": "email_reports.schedule_hourly",
"schedule": crontab(minute=1, hour="*"),
}
}
Celery configuration , The mail task will be scheduled, but an error will be reported.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. For admin, please label this issue .pinned
to prevent stale bot from closing the issue.
This is my setup
WEBDRIVER_BASEURL = "http://chrome:4444/wd/hub" EMAIL_REPORTS_WEBDRIVER = "chrome"
why do you set WEBDRIVER_BASEURL = "http://chrome:4444/wd/hub"? And I have another question, why the default port in WEBDRIVER_BASEURL is 8080, not 8088.
i have enabled the email service in my config.py but getting below error when trying to create the email report :
Can anyone please guide ?
You need to set
ENABLE_SCHEDULED_EMAIL_REPORTS = True
in your config.py file
I have enabled this setting and did superset init from terminal. But when i tried creating a report i got below error :
Can you please assist ?
@Jarvis173 probably you have missing mandatory parameter during adding new schedule record. It might be because of for eg. you left "crontab" section empty,invalid, etc.
@Jarvis173 probably you have missing mandatory parameter during adding new schedule record. It might be because of for eg. you left "crontab" section empty,invalid, etc.
Now i've set crontab as "*/5 * * * *" , the job is created but i haven't received a test mail yet. What else do i need to configure.
@Jarvis173 probably you have missing mandatory parameter during adding new schedule record. It might be because of for eg. you left "crontab" section empty,invalid, etc.
Now i've set crontab as "*/5 * * * *" , the job is created but i haven't received a test mail yet. What else do i need to configure.
Have you got the answer- Did you get the email? i am also facing the same problem.
I have the same issue as @Jarvis173 & @devesharora90, my users get Registration e-mails but not the reports. Did you come across any tips & tricks to make it work?
This is my setup
WEBDRIVER_BASEURL = "http://chrome:4444/wd/hub" EMAIL_REPORTS_WEBDRIVER = "chrome"
why do you set WEBDRIVER_BASEURL = "http://chrome:4444/wd/hub"? And I have another question, why the default port in WEBDRIVER_BASEURL is 8080, not 8088.
How did u setup chrome driver?
This is my setup
WEBDRIVER_BASEURL = "http://chrome:4444/wd/hub" EMAIL_REPORTS_WEBDRIVER = "chrome"
why do you set WEBDRIVER_BASEURL = "http://chrome:4444/wd/hub"? And I have another question, why the default port in WEBDRIVER_BASEURL is 8080, not 8088.
pluralize(len(dupes), 'name'), ', '.join(sorted(dupes)),
[2020-07-16 07:58:12,838: ERROR/ForkPoolWorker-1] Task email_reports.send[40ab936e-096a-492d-b3e9-e1694212da22] raised unexpected: AttributeError("'NoneType' object has no attribute 'is_active'",)
Traceback (most recent call last):
File "/opt/apps/ENVS/superset/lib/python3.6/site-packages/celery/app/trace.py", line 385, in trace_task
R = retval = fun(args, *kwargs)
File "/opt/apps/ENVS/superset/lib/python3.6/site-packages/superset/app.py", line 114, in __call__
return task_base.__call__(self, args, *kwargs)
File "/opt/apps/ENVS/superset/lib/python3.6/site-packages/celery/app/trace.py", line 650, in __protected_call__
return self.run(args, *kwargs)
File "/opt/apps/ENVS/superset/lib/python3.6/site-packages/superset/tasks/schedules.py", line 381, in schedule_email_report
deliver_slice(schedule)
File "/opt/apps/ENVS/superset/lib/python3.6/site-packages/superset/tasks/schedules.py", line 342, in deliver_slice
email = _get_slice_data(schedule)
File "/opt/apps/ENVS/superset/lib/python3.6/site-packages/superset/tasks/schedules.py", line 264, in _get_slice_data
for cookie in _get_auth_cookies():
File "/opt/apps/ENVS/superset/lib/python3.6/site-packages/superset/tasks/schedules.py", line 129, in _get_auth_cookies
login_user(user)
File "/opt/apps/ENVS/superset/lib/python3.6/site-packages/flask_login/utils.py", line 158, in login_user
if not force and not user.is_active:
AttributeError: 'NoneType' object has no attribute 'is_active'
How to resolve this error?
Most helpful comment
@sandy-ha please run
superset init
again in terminal, because FAB(FlaskAppbuilder) will initialize reporter menu access permission