Error: Continuous value supplied to discrete scale

Then most likely the problem is with your specific dataframe, so for us to been able to help you, we need a reproducible example including sample data.

If you've never heard of a reprex before, you might want to start by reading this FAQ: