Skip to content

Conversation

@karangattu
Copy link
Collaborator

@karangattu karangattu commented Jul 8, 2025

I suspect that the issue happened because stat_smooth was trying to draw these trend lines, but some groups didn't have enough data points to create a meaningful line.
I’m not sure we really need to include stat_smooth in our example.

This is to fix the errors in the shiny console that caused the shiny examples tests to fail

/py-shiny/.venv/lib/python3.12/site-packages/plotnine/stats/stat_smooth.py:215: PlotnineWarning: Smoothing requires 2 or more points. Got 1. Not enough points for smoothing. If this message a surprise, make sure the column mapped to the x aesthetic has the right dtype.
/py-shiny/.venv/lib/python3.12/site-packages/statsmodels/regression/linear_model.py:1717: RuntimeWarning: divide by zero encountered in scalar divide
/py-shiny/.venv/lib/python3.12/site-packages/plotnine/stats/smoothers.py:562: RuntimeWarning: invalid value encountered in dot
/py-shiny/.venv/lib/python3.12/site-packages/plotnine/stats/stat_smooth.py:215: PlotnineWarning: Smoothing requires 2 or more points. Got 1. Not enough points for smoothing. If this message a surprise, make sure the column mapped to the x aesthetic has the right dtype.
/py-shiny/.venv/lib/python3.12/site-packages/statsmodels/regression/linear_model.py:1717: RuntimeWarning: divide by zero encountered in scalar divide
/py-shiny/.venv/lib/python3.12/site-packages/plotnine/stats/smoothers.py:562: RuntimeWarning: invalid value encountered in dot

@karangattu karangattu requested a review from schloerke July 8, 2025 11:40
@karangattu
Copy link
Collaborator Author

This might have fixed itself and maybe not required anymore. Hence closing

@karangattu karangattu closed this Jul 14, 2025
@karangattu karangattu deleted the fix-examples-tests branch July 14, 2025 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants