I have three alcohol concentrations (0,1,2) and four different qualitative grades (1, 2, 3 and 4) that I've assigned to embryos after ISH.

To show a different between the concentrations, I did a Kruskal Wallis test which gave me a p-value of 4.34e-06 (this seems quite low?). Was this the right test to use?

Also, what function/test should I use for a post hoc test to analyse between 0%:1%, 0%:2% and 1%:2%? I've tried dunn methods and wilcox.test but neither will work on my data.

The first error says that your alcoholpercentage variable is not numeric. So maybe try converting it to numeric first(and check that this does not result in changes in data - like NA values etc.). The second error is probably due R "remembers" the levels in factor even when you subset the data. Use droplevels or a similar function to get rid of it. For better assesment of your problems either attach a sample of your data, if possible or make a reproducible example if not.

thanks for your response!
I'm not sure how to attach my data. The table above is the data I'm using for this.

I don't understand why i would change alcohol percentage into numeric when it's ordinal but I tried anyway and i changed the alcohol percentage to numeric and the formula still didn't work.

this is my coding: #changing variables to categorical
class(conc_analysis$embryograding)
conc_analysis$embryograding<- as.factor(conc_analysis$embryograding)

Your alcoholpercentage variable should not be factor, but numeric instead (I assume it is the dependent variable). embryograding should be factor. Check out some info on variable types in R, for example.