sphinxcontrib-towncrier icon indicating copy to clipboard operation
sphinxcontrib-towncrier copied to clipboard

Error in get_outdated_docs when directory is not specified

Open jaraco opened this issue 2 years ago • 0 comments
trafficstars

Towncrier uses the directory newsfragments by default. However, if directory is not defined in the towncrier config, this plugin will fail with the following error:

Extension error (sphinxcontrib.towncrier.ext):
Handler <bound method TowncrierDraftEntriesEnvironmentCollector.get_outdated_docs of <sphinxcontrib.towncrier.ext.TowncrierDraftEntriesEnvironmentCollector object at 0x107773750>> for event 'env-get-outdated' threw an exception (exception: unsupported operand type(s) for /: 'PosixPath' and 'NoneType')

Adding directory = "newsfragments" to the config works around the error.

This extension should support the same defaults as towncrier.

jaraco avatar Jun 21 '23 11:06 jaraco