Forcing the quality of a tag using python script

I tried the following script through a button (event handler) in a popup.

system.Tag.writeToTag("Path/to/tag".Quality,410)

I got an error

‘Error writing : Specified tag does not allow write’

I have all the permission for writing and i can also write value to the tag, so it can’t be a permission error.
I am trying to do this as I could disable the tag and activate its overlay.

Please help me resolve the error and solve this problem.
Looking forward to a solution

You cannot write a value to the quality of a tag. You can enable or disable a tag. You can set the quality of a component to activate an overlay without affecting the tag.

You actually can write the quality and timestamp to a tag. See this post:

http://forum.inductiveautomation.com/t/change-tag-quality-in-script/25667/4?u=travis.cox