Any person who erects, constructs, alters, repairs, converts, maintains, or uses any building, structure or land in violation of this chapter shall, upon conviction thereof by any court authorized by law to hear and determine the matter, be liable to a fine of not more than $1,000 or to imprisonment for a term of not more than 90 days, or both, as such court in its discretion may impose.