Title: NotImplementedError on calling numbering_part with file that has never known bullet points · Issue #1541 · python-openxml/python-docx · GitHub
Open Graph Title: NotImplementedError on calling numbering_part with file that has never known bullet points · Issue #1541 · python-openxml/python-docx
X Title: NotImplementedError on calling numbering_part with file that has never known bullet points · Issue #1541 · python-openxml/python-docx
Description: Summary I've been having issues with adding bullet points to my .docx file (and, unlike in #204+), it is one. I received a file using a company-made theme that does not contain any style for bullet points (among other oddities), and the ...
Open Graph Description: Summary I've been having issues with adding bullet points to my .docx file (and, unlike in #204+), it is one. I received a file using a company-made theme that does not contain any style for bullet...
X Description: Summary I've been having issues with adding bullet points to my .docx file (and, unlike in #204+), it is one. I received a file using a company-made theme that does not contain any style for bu...
Opengraph URL: https://github.com/python-openxml/python-docx/issues/1541
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"NotImplementedError on calling numbering_part with file that has never known bullet points","articleBody":"## Summary\n\nI've been having issues with adding bullet points to my `.docx` file (and, unlike in #204+), it is one.\n\nI received a file using a company-made theme that does not contain any style for bullet points (among other oddities), and the was almost empty. Attempting to add bullet points programmatically (using code found on [stack overflow](https://stackoverflow.com/a/51830413)) lead to the error below.\n\nAdding bullet points to the file and then removing them seems to do the trick.\n\nMy question is: is there a way to add the probably missing metadata (I don't know what it is, I'm no expert in MSOffice formats) back into the file, so that my users don't have to do this ?\n\n## L;DR\n\n### Minimum viable example\n\n```python\nimport docx\ndoc = docx.Document('/path/to/file.docx')\ndoc.part.numbering_part # error below\n```\n\n\u003cdetails>\u003csummary>Stack trace\u003c/summary>\n\n```plaintext\nTraceback (most recent call last):\n File \".\\venv\\docx\\parts\\document.py\", line 105, in numbering_part\n return cast(NumberingPart, self.part_related_by(RT.NUMBERING))\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \".\\venv\\docx\\opc\\part.py\", line 124, in part_related_by\n return self.rels.part_with_reltype(reltype)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \".\\venv\\docx\\opc\\rel.py\", line 52, in part_with_reltype\n rel = self._get_rel_of_type(reltype)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \".\\venv\\docx\\opc\\rel.py\", line 98, in _get_rel_of_type\n raise KeyError(tmpl % reltype)\nKeyError: \"no relationship of type 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/numbering' in collection\"\n\nDuring handling of the above exception, another exception occurred:\n\nTraceback (most recent call last):\n File \".\\code.py\", line 3, in \u003cmodule>\n value = self._fget(obj)\n ^^^^^^^^^^^^^^^\n File \".\\venv\\docx\\parts\\document.py\", line 107, in numbering_part\n numbering_part = NumberingPart.new()\n ^^^^^^^^^^^^^^^^^^^\n File \".\\venv\\docx\\parts\\numbering.py\", line 14, in new\n raise NotImplementedError\nNotImplementedError\n```\n\n\u003c/details>\n\n* Version: `1.2.0`\n* Python: `3.12.12`\n* OS: Windows 11 ","author":{"url":"https://github.com/Alexandre-SCHOEPP","@type":"Person","name":"Alexandre-SCHOEPP"},"datePublished":"2026-02-12T16:36:28Z","url":"https://github.com/python-openxml/python-docx/issues/1541"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:f0b71d99-b6ee-e15f-8d4d-f63d450d733a |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8CAA:35DD44:204339:2B776A:6AFF6394 |
| html-safe-nonce | 4b7e44bb17346cf2368d0aa2a71fce34bc1e951605c61516a2dca54af921a179 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4Q0FBOjM1REQ0NDoyMDQzMzk6MkI3NzZBOjZBRkY2Mzk0IiwidmlzaXRvcl9pZCI6IjIxNDAzMjY4NTk4OTA0NTEzNDgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | c5da1903600a132f077d3491b613cd8a7b300f9a43db341967e46e6c8574d2d4 |
| hovercard-subject-tag | issue:3932795162 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python-openxml/python-docx/1541/issue_layout |
| twitter:image | https://opengraph.githubassets.com/ebe32e4d4182a8c964a1a6c4d2edb2ae73a269efa72230e6071122f8d58a14d2/python-openxml/python-docx/issues/1541 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/ebe32e4d4182a8c964a1a6c4d2edb2ae73a269efa72230e6071122f8d58a14d2/python-openxml/python-docx/issues/1541 |
| og:image:alt | Summary I've been having issues with adding bullet points to my .docx file (and, unlike in #204+), it is one. I received a file using a company-made theme that does not contain any style for bullet... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Alexandre-SCHOEPP |
| hostname | github.com |
| expected-hostname | github.com |
| None | 41b58589a1c4eda1e3c8904144a412b88ca4455f63ca2ad3629f2e9f3c3a1d12 |
| turbo-cache-control | no-preview |
| go-import | github.com/python-openxml/python-docx git https://github.com/python-openxml/python-docx.git |
| octolytics-dimension-user_id | 3403760 |
| octolytics-dimension-user_login | python-openxml |
| octolytics-dimension-repository_id | 13592924 |
| octolytics-dimension-repository_nwo | python-openxml/python-docx |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 13592924 |
| octolytics-dimension-repository_network_root_nwo | python-openxml/python-docx |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8968d6d6acc65d74e4df332d23932dd3fd0502a4 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width