Closed eohulse closed 2 years ago
i have the same issue
CRON : 30-50/10 8 *
When I click add, an error is prompted
2021-11-10 15:07:17,679:ERROR:root:An error occured when generating the expression description. Check the cron expression syntax. Traceback (most recent call last): File "/usr/local/lib/python3.8/site-packages/cron_descriptor/ExpressionDescriptor.py", line 125, in get_full_description time_segment = self.get_time_of_day_description() File "/usr/local/lib/python3.8/site-packages/cron_descriptor/ExpressionDescriptor.py", line 181, in get_time_of_day_description self.format_time(hour_expression, minute_parts[0]), self.format_time(hour_expression, minute_parts[1]))) File "/usr/local/lib/python3.8/site-packages/cron_descriptor/ExpressionDescriptor.py", line 534, in format_time minute = str(int(minute_expression)) # !FIXME WUT ??? ValueError: invalid literal for int() with base 10: '50/10'
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/usr/local/lib/python3.8/site-packages/flask_appbuilder/api/init.py", line 85, in wraps return f(self, *args, kwargs) File "/usr/local/lib/python3.8/site-packages/flask_appbuilder/api/init.py", line 155, in wraps return f(self, args, kwargs) File "/usr/local/lib/python3.8/site-packages/flask_appbuilder/api/init.py", line 1592, in get_list return self.get_list_headless(kwargs) File "/usr/local/lib/python3.8/site-packages/superset/utils/log.py", line 241, in wrapper value = f(args, kwargs) File "/usr/local/lib/python3.8/site-packages/superset/views/base_api.py", line 406, in get_list_headless duration, response = time_function(super().get_list_headless, *kwargs) File "/usr/local/lib/python3.8/site-packages/superset/utils/core.py", line 1429, in time_function response = func(args, kwargs) File "/usr/local/lib/python3.8/site-packages/flask_appbuilder/api/init.py", line 1494, in get_list_headless _response[API_RESULT_RES_KEY] = _list_model_schema.dump(lst, many=True) File "/usr/local/lib/python3.8/site-packages/marshmallow/schema.py", line 552, in dump result = self._serialize(processed_obj, many=many) File "/usr/local/lib/python3.8/site-packages/marshmallow/schema.py", line 514, in _serialize return [ File "/usr/local/lib/python3.8/site-packages/marshmallow/schema.py", line 515, in
self._serialize(d, many=False) File "/usr/local/lib/python3.8/site-packages/marshmallow/schema.py", line 520, in _serialize value = field_obj.serialize(attr_name, obj, accessor=self.get_attribute) File "/usr/local/lib/python3.8/site-packages/marshmallow/fields.py", line 339, in serialize return self._serialize(value, attr, obj, kwargs) File "/usr/local/lib/python3.8/site-packages/marshmallow/fields.py", line 1925, in _serialize return self._call_or_raise(self.serialize_func, obj, attr) File "/usr/local/lib/python3.8/site-packages/marshmallow/fields.py", line 1939, in _call_or_raise return func(value) File "/usr/local/lib/python3.8/site-packages/superset/models/reports.py", line 153, in crontab_humanized return get_description(self.crontab) File "/usr/local/lib/python3.8/site-packages/cron_descriptor/ExpressionDescriptor.py", line 615, in get_description return descripter.get_description(DescriptionTypeEnum.FULL) File "/usr/local/lib/python3.8/site-packages/cron_descriptor/ExpressionDescriptor.py", line 105, in get_description description = choices.get(description_type, self.get_seconds_description)() File "/usr/local/lib/python3.8/site-packages/cron_descriptor/ExpressionDescriptor.py", line 147, in get_full_description raise FormatException(description) cron_descriptor.Exception.FormatException: An error occured when generating the expression description. Check the cron expression syntax.
@eohulse there has been lot of fixes / improvements to the alert/report features. If you are still facing the same error on latest version please reopen or file new ticket. Thanks!
Some CRON schedules when saved in the database cannot be read back. For example, when scheduling a report to be sent every day at 20:00, 20:05, and 20:10 (CRON 0-10/5 20 *), one can save this to the database. However when the Alerts & reports page is reloaded the page does not load any report, and an error appear in the log indicating 10/5 cannot be handled.
Expected results
Since I generated the CRON using the UI, superset should be able to read them back from the database.
Actual results
No reports can be loaded or created anymore. The whole alert/reporting functionality seemed to be broken because o f the error.
Screenshots
How to reproduce the bug
Environment
(please complete the following information):
1.01
3.7.9