LOS ANGELES - “Peter Rabbit” filmmakers and the studio behind it are apologizing for insensitively depicting a character's allergy in the film that has prompted backlash online.

Sony Pictures says Sunday in a statement the film “should not have made light” of a character being allergic to blackberries “even in a cartoonish” way.

In “Peter Rabbit” which was released this weekend, the character of Mr. McGregor is allergic to blackberries. The rabbits fling the fruit at him in a scene and he is forced to use an EpiPen.

The charity group Kids with Food Allergies posted a warning about the scene on its Facebook page Friday prompting some on Twitter to start using the hashtag #boycottpeterrabbit.

The studio and filmmakers say they regret not being more aware and sensitive to the issue.