phdunboundlocalerror local variable 'type' referenced before assignmentShare on FacebookShare on Twitter415