-
Notifications
You must be signed in to change notification settings - Fork 13k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
500 error and unexpected keyword argument 'extra_filters' #29289
Comments
To resolve the 500 error and the unexpected keyword argument 'extra_filters' issue, follow these steps:
Additionally, there have been recent updates in the
Review the release notes for these versions to identify specific changes that could impact the Finally, ensure your
These configurations control CSRF protection settings, which directly impact how |
@dosu I think the issue is with |
The Here's an example of how export default function getFormDataWithExtraFilters({
chart,
filters,
nativeFilters,
chartConfiguration,
colorScheme,
colorNamespace,
sliceId,
dataMask,
extraControls,
labelColors,
sharedLabelColors,
allSliceIds,
}: GetFormDataWithExtraFiltersArguments) {
// if dashboard metadata + filters have not changed, use cache if possible
const cachedFormData = cachedFormdataByChart[sliceId];
if (
cachedFiltersByChart[sliceId] === filters &&
areObjectsEqual(cachedFormData?.color_scheme, colorScheme, {
ignoreUndefined: true,
}) &&
areObjectsEqual(cachedFormData?.color_namespace, colorNamespace, {
ignoreUndefined: true,
}) &&
areObjectsEqual(cachedFormData?.label_colors, labelColors, {
ignoreUndefined: true,
}) &&
areObjectsEqual(cachedFormData?.shared_label_colors, sharedLabelColors, {
ignoreUndefined: true,
}) &&
!!cachedFormData &&
areObjectsEqual(cachedFormData?.dataMask, dataMask, {
ignoreUndefined: true,
}) &&
areObjectsEqual(cachedFormData?.extraControls, extraControls, {
ignoreUndefined: true,
})
) {
return cachedFormData;
}
let extraData: { extra_form_data?: JsonObject } = {};
const activeFilters = getAllActiveFilters({
chartConfiguration,
dataMask,
nativeFilters,
allSliceIds,
});
const filterIdsAppliedOnChart = Object.entries(activeFilters)
.filter(([, { scope }]) => scope.includes(chart.id))
.map(([filterId]) => filterId);
if (filterIdsAppliedOnChart.length) {
extraData = {
extra_form_data: getExtraFormData(dataMask, filterIdsAppliedOnChart),
};
}
const formData = {
...chart.form_data,
label_colors: labelColors,
shared_label_colors: sharedLabelColors,
...(colorScheme && { color_scheme: colorScheme }),
extra_filters: getEffectiveExtraFilters(filters),
...extraData,
...extraControls,
};
cachedFiltersByChart[sliceId] = filters;
cachedFormdataByChart[sliceId] = { ...formData, dataMask, extraControls };
return formData;
} Ensure that the |
Bug description
When trying to access
superset
through the browser I get a 500 error and the logs say:How to reproduce the bug
micromamba env create --name superset -c conda-forge superset pillow psycopg2-binary
export FLASK_APP=superset
export SUPERSET_CONFIG_PATH=/var/superset/config.py
(the same as in here)superset db upgrade
superset fab create-admin
superset init
Access `superset on browser.
Screenshots/recordings
No response
Superset version
4.0.1
Python version
3.11
Node version
I don't know
Browser
Firefox
Additional context
No response
Checklist
The text was updated successfully, but these errors were encountered: