At 81, Dame Maggie Smith has earned her actorly pedigree and therefore the freedom to choose whatever role she wants—even if it’s as a cartoonish vagabond in a wacky dramedy such as The Lady in the Van. But perhaps Smith was driven by warm memories, having originated the character in Alan Bennett’s 1999 play. And perhaps the film version, adapted by Bennett and directed by Nicholas Hytner, had received studio notes to drum things up bigger and broader to satisfy audiences not so keen on subtlety.

Well, we can pretend.

This “mostly true story” tells of the relationship between a writer, unimaginatively named Alan (Alex Jennings), and a homeless woman, Miss Shepherd (Smith). Whimsically, there are actually two Alans: the one who “lives” (and thus interacts with Miss Shepherd) and the one who writes (both played by Jennings). It’s 1970 London, and the Alans along with the rest of the quaint neighborhood wring their collective hands over what to do with Miss Shepherd, who parks her ramshackle van in front of various addresses and thinks nothing of barging into a home to use the loo or yelling at anyone playing music, including children. (Why kids are playing instruments on the sidewalk in one scene is a mystery.)

When Miss Shepherd receives a notice that she’s not allowed to park on the street, Alan grudgingly allows her to use his driveway. Meanwhile, neighbors who bring her food or attempt small talk receive nasty shutdowns instead of gratitude in return. “I’m a sick woman!” Miss Shepherd often barks, the fact usually irrelevant to the situation.

But quelle surprise! As Alan gets to know her better, he discovers that Miss Shepherd speaks French, plays piano, and was once a nun. Could she be a worthy, fully rounded human being and not just a novel nuisance after all?

Miss Shepherd’s personality is enough to grate, but The Lady in the Van has other counts against it. Hytner’s worst folly is his absolute failure to express the passage of time: The story proceeds as if it’s marking days, then suddenly we find out that the woman has been parked in Alan’s drive for 15 years. Script-wise, although we find out more about Miss Shepherd’s background, there’s only a tenuous explanation for how she ended up homeless. And several details elicit head-scratching, such as a young man who sometimes is in Alan’s apartment (though that’s later fleshed out) or the time Miss Shepherd suddenly takes a joyful day trip to the beach, riding a carousel and savoring a sundae.

The conceit of two Alans, too, does nothing to add to the story. The film is decoratively narrated by Alan the Writer, the stylized words coming from his work. Some of it is admittedly droll, as only British wit can be. But the voiceover eventually descends into triteness (“There’s no such thing as marking time; time marks you”), and boy do the filmmakers take an abrupt turn toward the ridiculous in the final moments. The Lady in the Van might be preaching, one guesses, about behaving kindly and without judgment toward strangers. The highs and lows that shape it, however, feel unearned.

The Lady in the Van opens Friday at Landmark’s Bethesda Row and E Street cinemas.