You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When filtering a dataframe based on row values does not produce results, the following error is thrown:
<user_path>site-packages\IPython\core\formatters.py:918: UserWarning:
Unexpected error in rendering Lux widget and recommendations. Falling back to Pandas display.
Please report the following issue on Github: https://github.com/lux-org/lux/issues
<user_path>site-packages\lux\core\frame.py:609: UserWarning:Traceback (most recent call last):
File "<user_path>site-packages\lux\core\frame.py", line 571, in ipython_display
self.maintain_recs()
File "<user_path>site-packages\lux\core\frame.py", line 428, in maintain_recs
rec_df.show_all_column_vis()
File "<user_path>site-packages\lux\core\frame.py", line 349, in show_all_column_vis
vis = Vis(list(self.columns), self)
File "<user_path>site-packages\lux\vis\Vis.py", line 39, in init
self.refresh_source(self._source)
File "<user_path>site-packages\lux\vis\Vis.py", line 356, in refresh_source
Compiler.compile_vis(ldf, self)
File "<user_path>site-packages\lux\processor\Compiler.py", line 58, in compile_vis
Compiler.populate_data_type_model(ldf, [vis])
File "<user_path>site-packages\lux\processor\Compiler.py", line 176, in populate_data_type_model
clause.data_type = ldf.data_type[clause.attribute]
KeyError: 'CountryCode'
To Reproduce
Please describe the steps needed to reproduce the behavior. For example:
Create a dataframe
wdi_country_series_df = pd.read_csv('../lux_data/WDICountry-Series.csv')
Filter dataframe
wdi_country_series_df[wdi_country_series_df['CountryCode'] == 'ARB']
Country with this country codes does not exists in dataframe, so error appears.
Expected behavior
Produce empty widget, no recommendation.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
Thanks for raising this issue @Innko! I've added a fix to this bug, this will be released along with other changes in our next release! Let us know if you run into any other problems!
Describe the bug
When filtering a dataframe based on row values does not produce results, the following error is thrown:
<user_path>site-packages\IPython\core\formatters.py:918: UserWarning:
Unexpected error in rendering Lux widget and recommendations. Falling back to Pandas display.
Please report the following issue on Github: https://github.com/lux-org/lux/issues
<user_path>site-packages\lux\core\frame.py:609: UserWarning:Traceback (most recent call last):
File "<user_path>site-packages\lux\core\frame.py", line 571, in ipython_display
self.maintain_recs()
File "<user_path>site-packages\lux\core\frame.py", line 428, in maintain_recs
rec_df.show_all_column_vis()
File "<user_path>site-packages\lux\core\frame.py", line 349, in show_all_column_vis
vis = Vis(list(self.columns), self)
File "<user_path>site-packages\lux\vis\Vis.py", line 39, in init
self.refresh_source(self._source)
File "<user_path>site-packages\lux\vis\Vis.py", line 356, in refresh_source
Compiler.compile_vis(ldf, self)
File "<user_path>site-packages\lux\processor\Compiler.py", line 58, in compile_vis
Compiler.populate_data_type_model(ldf, [vis])
File "<user_path>site-packages\lux\processor\Compiler.py", line 176, in populate_data_type_model
clause.data_type = ldf.data_type[clause.attribute]
KeyError: 'CountryCode'
To Reproduce
Please describe the steps needed to reproduce the behavior. For example:
wdi_country_series_df = pd.read_csv('../lux_data/WDICountry-Series.csv')
wdi_country_series_df[wdi_country_series_df['CountryCode'] == 'ARB']
Country with this country codes does not exists in dataframe, so error appears.
Expected behavior
Produce empty widget, no recommendation.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: