Unexpected keyword argument `filter_action`

Hi Friends,
I’m new here…
Kindly help me on below error on Keyword argument ‘filter_action’.
My dash version as follows
dash_

I try use the sample code for dash table in plotly still getting this error.

TypeError: Unexpected keyword argument filter_action
Allowed arguments: active_cell, column_conditional_dropdowns, column_conditional_tooltips, column_static_dropdown, column_static_tooltip, columns, content_style, css, data, data_previous, data_timestamp, derived_viewport_data, derived_viewport_indices, derived_viewport_selected_rows, derived_virtual_data, derived_virtual_indices, derived_virtual_selected_rows, dropdown_properties, editable, end_cell, filtering, filtering_settings, filtering_type, filtering_types, id, is_focused, locale_format, merge_duplicate_headers, n_fixed_columns, n_fixed_rows, navigation, pagination_mode, pagination_settings, row_deletable, row_selectable, selected_cells, selected_rows, sorting, sorting_settings, sorting_treat_empty_string_as_none, sorting_type, start_cell, style_as_list_view, style_cell, style_cell_conditional, style_data, style_data_conditional, style_filter, style_filter_conditional, style_header, style_header_conditional, style_table, tooltip_delay, tooltip_duration, tooltips, virtualization

Regards,
Than_gold

Hi @than_gold

There is no reason for that, share the code you are using or the link to the page example and I will check if the same hapens to me.

Hello @Eduardo ,
thank you for look on my issue.
below is my code I’m using.

import dash
from dash.dependencies import Input, Output
import dash_table
import dash_html_components as html
import datetime

import pandas as pd

df = pd.read_csv(‘https://raw.githubusercontent.com/plotly/datasets/master/gapminder2007.csv’)
print(df.head())
df = df[[‘continent’, ‘country’, ‘pop’, ‘lifeExp’]] # prune columns for example
df[‘Mock Date’] = [
datetime.datetime(2020, 1, 1, 0, 0, 0) + i * datetime.timedelta(hours=13)
for i in range(len(df))
]

app = dash.Dash(name)

app.layout = dash_table.DataTable(
columns=[
{‘name’: ‘Continent’, ‘id’: ‘continent’, ‘type’: ‘numeric’},
{‘name’: ‘Country’, ‘id’: ‘country’, ‘type’: ‘text’},
{‘name’: ‘Population’, ‘id’: ‘pop’, ‘type’: ‘numeric’},
{‘name’: ‘Life Expectancy’, ‘id’: ‘lifeExp’, ‘type’: ‘numeric’},
{‘name’: ‘Mock Dates’, ‘id’: ‘Mock Date’, ‘type’: ‘datetime’}
],
data=df.to_dict(‘records’),
filter_action=“native”,

style_table={
    'height': 400,
},
style_data={
    'width': '150px', 'minWidth': '150px', 'maxWidth': '150px',
    'overflow': 'hidden',
    'textOverflow': 'ellipsis',
}

)

if name == ‘main’:
app.run_server(debug=True)

@than_gold
Use the </> in the header of the message to copy the code.

type or paste code here

filter
Code in above link i’m using to check it

@than_gold

Working without errors

image

1 Like

For some reason is working with an old version. :thinking:

great …for you working without error.
but i’m getting error as unexpected keyword argument

so any work around is there to solve it?

@Eduardo ,
I just replaced “filter_action” with “filtering” and its working now.

Great !!

But be careful because for some reason you are running an old version, I had similar problems when I did and upgrade, the version showed as installed said that was the last but in the error message it was a reference to an older parser version.

can u pls give me the versions you are using…it will be helpfull for me to install the same in mymachine.

I’m using the same that you. It’s the last one.
In my case (when I had same problems) I think it was related with the environment or with the way I updated (first I installed with conda and I updated with pip).
I decided to uninstall everything and reinstall it, and the problem disappeared.