The pathetic fallacy or anthropomorphic fallacy is the treatment of inanimate objects as if they had human feelings, thought, or sensations.
The pathetic fallacy is a special case of the fallacy of reification. The word ‘pathetic’ in this use is related to ‘pathos’ or ’empathy’ (capability of feeling), and is not pejorative.
In the discussion of literature, the pathetic fallacy is similar to personification. Personification is direct and explicit in the ascription of life and sentience to the thing in question, whereas the pathetic fallacy is much broader and more allusive.
This treatment is common in literature:
“The stars will awaken
Though the moon sleep a full hour later”
— Percy Bysshe Shelley
“The fruitful field
Laughs with abundance”
— William Cowper
“Nature must be gladsome when I was so happy”
— Jane Eyre, by Charlotte Brontë