assignmentunboundlocalerror local variable 'write' referenced before assignmentShare on FacebookShare on Twitter283