I should be able to select the result of the calculated column so I can use it on the Y-axis or as a column on a table, but it is showing "Internal Server Error"
Here is the traceback:
Traceback (most recent call last):
File "apps/frappe/frappe/app.py", line 95, in application
response = frappe.api.handle()
File "apps/frappe/frappe/api.py", line 54, in handle
return frappe.handler.handle()
File "apps/frappe/frappe/handler.py", line 47, in handle
data = execute_cmd(cmd)
File "apps/frappe/frappe/handler.py", line 85, in execute_cmd
return frappe.call(method, frappe.form_dict)
File "apps/frappe/frappe/init.py", line 1622, in call
return fn(*args, *newargs)
File "apps/frappe/frappe/client.py", line 188, in set_value
doc.save()
File "apps/frappe/frappe/model/document.py", line 309, in save
return self._save(args, kwargs)
File "apps/frappe/frappe/model/document.py", line 343, in _save
self.run_before_save_methods()
File "apps/frappe/frappe/model/document.py", line 1056, in run_before_save_methods
self.run_method("before_save")
File "apps/frappe/frappe/model/document.py", line 919, in run_method
out = Document.hook(fn)(self, *args, kwargs)
File "apps/frappe/frappe/model/document.py", line 1281, in composer
return composed(self, method, *args, *kwargs)
File "apps/frappe/frappe/model/document.py", line 1263, in runner
add_to_return_value(self, fn(self, args, kwargs))
File "apps/frappe/frappe/model/document.py", line 916, in fn
return method_object(*args, kwargs)
File "apps/insights/insights/insights/doctype/insightsquery/insightsquery.py", line 45, in before_save
self.variant_controller.before_save()
File "apps/insights/insights/insights/doctype/insights_query/insightsassistedquery.py", line 43, in before_save
update_sql(self.doc)
File "apps/insights/insights/insights/doctype/insights_query/utils.py", line 63, in updatesql
sql = datasource.build_query(query)
File "apps/insights/insights/insights/doctype/insights_data_source/insightsdatasource.py", line 144, in build_query
return self.db.build_query(query)
File "apps/insights/insights/insights/doctype/insights_datasource/sources/basedatabase.py", line 48, in build_query
querystr = self.querybuilder.build(query, dialect=self.engine.dialect)
File "apps/insights/insights/insights/querybuilders/sqlbuilder.py", line 527, in build
return self.build_assisted_query()
File "apps/insights/insights/insights/querybuilders/sqlbuilder.py", line 794, in build_assisted_query
return self.compile(query)
File "apps/insights/insights/insights/querybuilders/sqlbuilder.py", line 667, in compile
compiled = query.compile(compile_args)
File "env/lib/python3.10/site-packages/sqlalchemy/sql/elements.py", line 308, in compile
return self._compiler(dialect, kw)
File "env/lib/python3.10/site-packages/sqlalchemy/sql/elements.py", line 316, in _compiler
return dialect.statement_compiler(dialect, self, kw)
File "env/lib/python3.10/site-packages/sqlalchemy/sql/compiler.py", line 1426, in init
Compiled.init(self, dialect, statement, kwargs)
File "env/lib/python3.10/site-packages/sqlalchemy/sql/compiler.py", line 867, in init
self.string = self.process(self.statement, compile_kwargs)
File "env/lib/python3.10/site-packages/sqlalchemy/sql/compiler.py", line 912, in process
return obj._compiler_dispatch(self, kwargs)
File "env/lib/python3.10/site-packages/sqlalchemy/sql/visitors.py", line 143, in _compiler_dispatch
return meth(self, kw) # type: ignore # noqa: E501
File "env/lib/python3.10/site-packages/sqlalchemy/sql/compiler.py", line 4670, in visit_select
for c in [
File "env/lib/python3.10/site-packages/sqlalchemy/sql/compiler.py", line 4671, in
self._label_select_column(
File "env/lib/python3.10/site-packages/sqlalchemy/sql/compiler.py", line 4350, in _label_select_column
impl = column.type.dialect_impl(self.dialect)
AttributeError: 'NoneType' object has no attribute 'dialect_impl'
I should be able to select the result of the calculated column so I can use it on the Y-axis or as a column on a table, but it is showing "Internal Server Error"![image](https://github.com/frappe/insights/assets/148065696/c5e895d0-1e42-4422-8613-cf62addde1af)
Here is the traceback:
Traceback (most recent call last): File "apps/frappe/frappe/app.py", line 95, in application response = frappe.api.handle() File "apps/frappe/frappe/api.py", line 54, in handle return frappe.handler.handle() File "apps/frappe/frappe/handler.py", line 47, in handle data = execute_cmd(cmd) File "apps/frappe/frappe/handler.py", line 85, in execute_cmd return frappe.call(method, frappe.form_dict) File "apps/frappe/frappe/init.py", line 1622, in call return fn(*args, *newargs) File "apps/frappe/frappe/client.py", line 188, in set_value doc.save() File "apps/frappe/frappe/model/document.py", line 309, in save return self._save(args, kwargs) File "apps/frappe/frappe/model/document.py", line 343, in _save self.run_before_save_methods() File "apps/frappe/frappe/model/document.py", line 1056, in run_before_save_methods self.run_method("before_save") File "apps/frappe/frappe/model/document.py", line 919, in run_method out = Document.hook(fn)(self, *args, kwargs) File "apps/frappe/frappe/model/document.py", line 1281, in composer return composed(self, method, *args, *kwargs) File "apps/frappe/frappe/model/document.py", line 1263, in runner add_to_return_value(self, fn(self, args, kwargs)) File "apps/frappe/frappe/model/document.py", line 916, in fn return method_object(*args, kwargs) File "apps/insights/insights/insights/doctype/insightsquery/insightsquery.py", line 45, in before_save self.variant_controller.before_save() File "apps/insights/insights/insights/doctype/insights_query/insightsassistedquery.py", line 43, in before_save update_sql(self.doc) File "apps/insights/insights/insights/doctype/insights_query/utils.py", line 63, in updatesql sql = datasource.build_query(query) File "apps/insights/insights/insights/doctype/insights_data_source/insightsdatasource.py", line 144, in build_query return self.db.build_query(query) File "apps/insights/insights/insights/doctype/insights_datasource/sources/basedatabase.py", line 48, in build_query querystr = self.querybuilder.build(query, dialect=self.engine.dialect) File "apps/insights/insights/insights/querybuilders/sqlbuilder.py", line 527, in build return self.build_assisted_query() File "apps/insights/insights/insights/querybuilders/sqlbuilder.py", line 794, in build_assisted_query return self.compile(query) File "apps/insights/insights/insights/querybuilders/sqlbuilder.py", line 667, in compile compiled = query.compile(compile_args) File "env/lib/python3.10/site-packages/sqlalchemy/sql/elements.py", line 308, in compile return self._compiler(dialect, kw) File "env/lib/python3.10/site-packages/sqlalchemy/sql/elements.py", line 316, in _compiler return dialect.statement_compiler(dialect, self, kw) File "env/lib/python3.10/site-packages/sqlalchemy/sql/compiler.py", line 1426, in init Compiled.init(self, dialect, statement, kwargs) File "env/lib/python3.10/site-packages/sqlalchemy/sql/compiler.py", line 867, in init self.string = self.process(self.statement, compile_kwargs) File "env/lib/python3.10/site-packages/sqlalchemy/sql/compiler.py", line 912, in process return obj._compiler_dispatch(self, kwargs) File "env/lib/python3.10/site-packages/sqlalchemy/sql/visitors.py", line 143, in _compiler_dispatch return meth(self, kw) # type: ignore # noqa: E501 File "env/lib/python3.10/site-packages/sqlalchemy/sql/compiler.py", line 4670, in visit_select for c in [ File "env/lib/python3.10/site-packages/sqlalchemy/sql/compiler.py", line 4671, in
self._label_select_column(
File "env/lib/python3.10/site-packages/sqlalchemy/sql/compiler.py", line 4350, in _label_select_column
impl = column.type.dialect_impl(self.dialect)
AttributeError: 'NoneType' object has no attribute 'dialect_impl'