Sounds like you tried something like this:
Setting variables inside godot (since 3) nearly always works by simply assigning them to the new value like this:
$button.rect_size = Vector2(100,200)
Hope it solves your problem. If not, please give some further information like: your code, the original error message, etc.