Dummy encoding the categorical variables using the changed version of OneHotEncoder
Did you try using 

X = pd.get_dummies(X)


?

Otherwise make sure that your X is either a 2D Array or a dataframe for OneHotEncoding to work.