wp_set_post_terms struggle :(

Just by posting.. I made a final test.
And I suspected a conflict somewhere in the custom taxonomy names, what I did is I changed the name of the custom taxonomy in function.php

wp_set_post_terms( $post_id, $county, 'kommun1');

is working well 🙂

I got so focused on the variable. my bad…

have a nice day

error code: 523