You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "sfirke (via GitHub)" <gi...@apache.org> on 2025/12/11 14:43:41 UTC
[I] (low priority) Histogram throws warning in logs in 6.0.0rc4 [superset]
sfirke opened a new issue, #36530:
URL: https://github.com/apache/superset/issues/36530
### Bug description
When you load a dashboard with a Histogram chart, or edit one directly, this Pandas warning appears in the logs:
```
superset_app | /app/superset/utils/pandas_postprocessing/histogram.py:57: SettingWithCopyWarning:
superset_app | A value is trying to be set on a copy of a slice from a DataFrame.
superset_app | Try using .loc[row_indexer,col_indexer] = value instead
superset_app |
superset_app | See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
superset_app | df[column] = to_numeric(df[column], errors="coerce")
```
Doesn't seem to be affecting anything in how the application operates, just something to clean up.
### Screenshots/recordings
_No response_
### Superset version
master / latest-dev
### Python version
I don't know
### Node version
I don't know
### Browser
Not applicable
### Additional context
_No response_
### Checklist
- [x] I have searched Superset docs and Slack and didn't find a solution to my problem.
- [x] I have searched the GitHub issue tracker and didn't find a similar bug report.
- [x] I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [I] (low priority) Histogram throws warning in logs in 6.0.0rc4 [superset]
Posted by "sfirke (via GitHub)" <gi...@apache.org>.
sfirke commented on issue #36530:
URL: https://github.com/apache/superset/issues/36530#issuecomment-3643271671
Hi @Aditya23-lab - maybe you commented on the wrong issue, this one is about backend Python logs not frontend dashboard layout.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [I] (low priority) Histogram throws warning in logs in 6.0.0rc4 [superset]
Posted by "sfirke (via GitHub)" <gi...@apache.org>.
sfirke commented on issue #36530:
URL: https://github.com/apache/superset/issues/36530#issuecomment-3644703760
@tysoncung the fix entails finding the line that Dosu bot identifies where there's a warning thrown by pandas. Adjust that line to do the same thing in a way that does not cause a warning. The behavior of the chart should remain the same. Bonus: check for any other places in the codebase that use this same operation, see if they throw a similar warning, and replace the in the same fashion.
The PR to fix this should show logs loading a histogram before (with the warning as I did) and after (no warning).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [I] (low priority) Histogram throws warning in logs in 6.0.0rc4 [superset]
Posted by "rishabhgoyal007 (via GitHub)" <gi...@apache.org>.
rishabhgoyal007 commented on issue #36530:
URL: https://github.com/apache/superset/issues/36530#issuecomment-3780713994
I was able to reproduce this on 6.0.0rc4. The Histogram warning is caused by assigning to a pandas DataFrame that may be a slice during post-processing (specifically the pd.to_numeric call), which triggers SettingWithCopyWarning.
Creating an explicit copy of the DataFrame before assignment (for example via dropna(...).copy()) removes the warning without affecting the rendered chart.
This appears to be addressed in newer branches, so upgrading or backporting the fix resolves the issue.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [I] (low priority) Histogram throws warning in logs in 6.0.0rc4 [superset]
Posted by "sfirke (via GitHub)" <gi...@apache.org>.
sfirke commented on issue #36530:
URL: https://github.com/apache/superset/issues/36530#issuecomment-3642418112
@dosu That PR you linked https://github.com/apache/superset/pull/35693 is in the changelog for version 6.0.0, I am running 6.0.0rc4 where I see this behavior. If that PR had fixed this, I should not be seeing this behavior in 6.0.0rc4, so I think you're wrong. Double-check that and look on master branch for where the problematic code still exists.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [I] (low priority) Histogram throws warning in logs in 6.0.0rc4 [superset]
Posted by "AryanBagade (via GitHub)" <gi...@apache.org>.
AryanBagade commented on issue #36530:
URL: https://github.com/apache/superset/issues/36530#issuecomment-3643836787
Hi @viveksb007,
I'd like to work on this issue.
Based on the discussion above, I understand the fix requires adding `conntrackCacheTableSize` to the Helm chart in `amazon-vpc-cni-k8s` (similar to how `conntrackCacheCleanupPeriod` is already exposed).
Since this issue was transferred from `amazon-vpc-cni-k8s`, should I open the PR there and reference this issue???
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [I] (low priority) Histogram throws warning in logs in 6.0.0rc4 [superset]
Posted by "Aditya23-lab (via GitHub)" <gi...@apache.org>.
Aditya23-lab commented on issue #36530:
URL: https://github.com/apache/superset/issues/36530#issuecomment-3643224850
Hi! I’m Aditya
I’d like to work on this issue.
Understanding:
The dashboard layout shifts unexpectedly, which seems related to the layout/grid code affecting positioning and responsiveness.
Plan:
Reproduce the issue locally.
Investigate the dashboard layout logic (CSS / grid / resize behavior).
Identify the root cause of the shifting.
Propose and implement a fix.
I have experience with frontend UI (React & CSS) and have done open source contributions. I’ll start by setting up Superset locally and exploring the layout components.
Please let me know if this issue is available to work on.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [I] (low priority) Histogram throws warning in logs in 6.0.0rc4 [superset]
Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
dosubot[bot] commented on issue #36530:
URL: https://github.com/apache/superset/issues/36530#issuecomment-3642267913
<!-- Answer -->
This warning happens because the histogram code assigns to a DataFrame column directly (`df[column] = to_numeric(df[column], errors="coerce")`), which can trigger a SettingWithCopyWarning if `df` is a slice rather than a copy. This doesn't break functionality, but it's a pandas best-practice issue and can signal subtle bugs if the DataFrame isn't handled carefully.
A recent fix ([PR #35693](https://github.com/apache/superset/pull/35693)) resolves this by dropping nulls from the target column before conversion (`df = df.dropna(subset=[column])`), which ensures the DataFrame is not a slice and avoids the warning. If you want to clean up your logs, make sure you're running a version of Superset that includes this change.
In general, when mutating DataFrames in pandas, it's safest to work on a copy or use `.loc` for assignments to avoid similar warnings.
<!-- Dosu Comment Footer -->
*To reply, just mention [@dosu](https://go.dosu.dev/dosubot).*
---
<sup>How did I do? [Good](https://app.dosu.dev/response-feedback/769b6f60-a50d-4c3f-86df-ea4f0e6c6a5c?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/769b6f60-a50d-4c3f-86df-ea4f0e6c6a5c?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/769b6f60-a50d-4c3f-86df-ea4f0e6c6a5c?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/769b6f60-a50d-4c3f-86df-ea4f0e6c6a5c?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/769b6f60-a50d-4c3f-86df-ea4f0e6c6a5c?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/769b6f60-a50d-4c3f-86df-ea4f0e6c6a5c?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/769b6f60-a50d-4c3f-86df-ea4f0e6c6a5c?feedback_type=other)</sup>
[](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github) [](https://cursor.com/link/prompt?text=This%20warning%20happens%20because%20the%20histogram%20code%20assigns%20to%20a%20DataFrame%20column%20directly%20%28%60df%5Bcolumn%5D%20%3D%20to_numeric%28df%5Bcolumn%5D%2C%20errors%3D%22coerce%22%29%60%29%2C%20which%20can%20trigger%20a%20SettingWithCopyWarning%20if%20%60df%60%20is%20a%20slice%20rather%20than%20a%20copy.%20This%20doesn%27t%20break%20functionality%2C%20but%20it%27s%20a%20pandas%20best-practice%20issue%20and%20can%20signal%20subtle%20bugs%20if%20the%20DataFrame%20isn%27t%20handled%20carefully.%0A%0AA%20recent%20fix%20%28%5BPR%20%2335693%5D%28https%3A//github.com/apache/superset/pull/35693%29%29%20resolves%20this%20by%20dropping%20nulls%20from%20the%20target%20column%20before%20conversion%20%28%60df%20%3D%20df.dropna%28subset%3D%5Bcol
umn%5D%29%60%29%2C%20which%20ensures%20the%20DataFrame%20is%20not%20a%20slice%20and%20avoids%20the%20warning.%20If%20you%20want%20to%20clean%20up%20your%20logs%2C%20make%20sure%20you%27re%20running%20a%20version%20of%20Superset%20that%20includes%20this%20change.%0A%0AIn%20general%2C%20when%20mutating%20DataFrames%20in%20pandas%2C%20it%27s%20safest%20to%20work%20on%20a%20copy%20or%20use%20%60.loc%60%20for%20assignments%20to%20avoid%20similar%20warnings.) [](https://go.dosu.dev/discord-bot) [](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/issues/36530)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [I] (low priority) Histogram throws warning in logs in 6.0.0rc4 [superset]
Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
dosubot[bot] commented on issue #36530:
URL: https://github.com/apache/superset/issues/36530#issuecomment-3642429093
<!-- Answer -->
You're correct—PR #35693 was merged on 2025-11-14, which is after the likely cut date for 6.0.0rc4, so the fix is not included in that release candidate. On the current master branch, the problematic line (`df[column] = to_numeric(df[column], errors="coerce")`) is still present without the null-dropping fix, so the SettingWithCopyWarning can still occur. The fix from PR #35693 adds `df = df.dropna(subset=[column])` before this line, but that change is not yet in master or 6.0.0rc4, which explains why you're still seeing the warning in your environment. You can track the merged PR and its code changes here: [PR #35693](https://github.com/apache/superset/pull/35693) and see the current code in master [here](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/utils/pandas_postprocessing/histogram.py#L51-L56).
<!-- Dosu Comment Footer -->
*To reply, just mention [@dosu](https://go.dosu.dev/dosubot).*
---
<sup>How did I do? [Good](https://app.dosu.dev/response-feedback/768742eb-f9a8-444d-81db-6a847427e491?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/768742eb-f9a8-444d-81db-6a847427e491?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/768742eb-f9a8-444d-81db-6a847427e491?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/768742eb-f9a8-444d-81db-6a847427e491?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/768742eb-f9a8-444d-81db-6a847427e491?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/768742eb-f9a8-444d-81db-6a847427e491?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/768742eb-f9a8-444d-81db-6a847427e491?feedback_type=other)</sup>
[](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github) [](https://cursor.com/link/prompt?text=You%27re%20correct%E2%80%94PR%20%2335693%20was%20merged%20on%202025-11-14%2C%20which%20is%20after%20the%20likely%20cut%20date%20for%206.0.0rc4%2C%20so%20the%20fix%20is%20not%20included%20in%20that%20release%20candidate.%20On%20the%20current%20master%20branch%2C%20the%20problematic%20line%20%28%60df%5Bcolumn%5D%20%3D%20to_numeric%28df%5Bcolumn%5D%2C%20errors%3D%22coerce%22%29%60%29%20is%20still%20present%20without%20the%20null-dropping%20fix%2C%20so%20the%20SettingWithCopyWarning%20can%20still%20occur.%20The%20fix%20from%20PR%20%2335693%20adds%20%60df%20%3D%20df.dropna%28subset%3D%5Bcolumn%5D%29%60%20before%20this%20line%2C%20but%20that%20change%20is%20not%20yet%20in%20master%20or%206.0.0rc4%2C%20which%20explains%20why%20you%27re%20still%20seeing%20
the%20warning%20in%20your%20environment.%20You%20can%20track%20the%20merged%20PR%20and%20its%20code%20changes%20here%3A%20%5BPR%20%2335693%5D%28https%3A//github.com/apache/superset/pull/35693%29%20and%20see%20the%20current%20code%20in%20master%20%5Bhere%5D%28https%3A//github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/utils/pandas_postprocessing/histogram.py%23L51-L56%29.) [](https://go.dosu.dev/discord-bot) [](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/issues/36530)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [I] (low priority) Histogram throws warning in logs in 6.0.0rc4 [superset]
Posted by "Aditya23-lab (via GitHub)" <gi...@apache.org>.
Aditya23-lab commented on issue #36530:
URL: https://github.com/apache/superset/issues/36530#issuecomment-3644978695
Hi! Thanks for the guidance.
I’ll locate the exact line in histogram.py where Pandas triggers the SettingWithCopyWarning and update it to use a safe assignment pattern (e.g., .loc[:, column] = …) so that behavior remains the same but without the warning.
My plan:
Reproduce the warning by loading a histogram chart and capture the logs (before).
Apply the fix to eliminate the warning while keeping the chart output unchanged.
Check the codebase for any other similar assignments that may raise the same warning and update those as well.
Provide logs in the PR showing the histogram load with warning (before) and without warning (after), as requested.
I’ll proceed with this—please let me know if you’d like me to follow any additional guidelines.
Thanks,
Aditya
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [I] (low priority) Histogram throws warning in logs in 6.0.0rc4 [superset]
Posted by "PunyaGowdagd66 (via GitHub)" <gi...@apache.org>.
PunyaGowdagd66 commented on issue #36530:
URL: https://github.com/apache/superset/issues/36530#issuecomment-3741946678
Hi ,@sfirke I noticed this issue is already resolved.
I’m interested in helping with similar pandas warnings or
other good-first-issues. Please let me know if you need help.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [I] (low priority) Histogram throws warning in logs in 6.0.0rc4 [superset]
Posted by "sfirke (via GitHub)" <gi...@apache.org>.
sfirke commented on issue #36530:
URL: https://github.com/apache/superset/issues/36530#issuecomment-3745014204
Okay @PunyaGowdagd66 I'll keep an eye out. In the meantime you can search this repo for any other issues with that tag (we don't use it regularly unfortunately) and also just review GitHub issues generally, looking for one that seems small/bite-sized.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [I] (low priority) Histogram throws warning in logs in 6.0.0rc4 [superset]
Posted by "tysoncung (via GitHub)" <gi...@apache.org>.
tysoncung commented on issue #36530:
URL: https://github.com/apache/superset/issues/36530#issuecomment-3644689151
I'm interested in working on this issue. Could you provide more context about what you're looking for? Any additional details about requirements or constraints would be helpful.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [I] (low priority) Histogram throws warning in logs in 6.0.0rc4 [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas closed issue #36530: (low priority) Histogram throws warning in logs in 6.0.0rc4
URL: https://github.com/apache/superset/issues/36530
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org