Note the parameter rules of both register_post_type
:
$post_type
(string) (required) Post type. (max. 20 characters, can not contain capital letters or spaces)
and register_taxonomy
:
$taxonomy
(string) (required) The name of the taxonomy. Name should only contain lowercase letters and the underscore character, and not be more than 32 characters long (database structure restriction)