Attempting to spawn a villager with
/summon Villager ~ ~ ~ profession:x (where x is any number)
always summons a Villager with a farmer profession (profession:0). using the career tag does not affect the career of the farmer villager. Changing the profession number seems to change the career of the villager summoned.
Because "profession:x" is not a valid string in the command. To use datatags, the format is as follows
so your command would be something like