Fix an error “TypeError: __init__() keywords must be strings”.

I think there is the same latent bug at line 63 (smart_bytes should be smart_text).