With the code you are using, it is unsurprising to see values of 0 estimated for trend or seasonality coefficients (beta, gamma) if you have data with near-constant trend or seasonality. This implementation initializes the trend and seasonality state using all the data, and subsequently searches for optimal alpha/beta/gamma parameter values using the same data. In this situation, initialization may find good, stationary values for the actual trend or seasonal offset components of the model state, and the parameter estimator will return 0 to prevent those values from changing.
If you want parameters that yield good prediction error for data outside of the original set, you can try a form of cross-validated estimation: run different subsequences of the original data and average their parameter estimates (possibly weighting their contributions by error). You should also consider estimating your initial state using a different subset of data than you use to estimate the parameters.