Any person who shall ride, drive any vehicle, drive any cattle, horses, mules or other livestock along or on any railroad track open and operated for traffic, unless by permission of the owners of said track, or their agent, shall be guilty of a misdemeanor and be fined not less than twenty-five dollars ($25.00) nor more than two hundred fifty dollars ($250.00). The penalty hereof shall not be incurred by operating a street railroad or by crossing a track.