Title: NumberingPart.new NotImplementedError · Issue #1313 · python-openxml/python-docx · GitHub
Open Graph Title: NumberingPart.new NotImplementedError · Issue #1313 · python-openxml/python-docx
X Title: NumberingPart.new NotImplementedError · Issue #1313 · python-openxml/python-docx
Description: the simple code from docx import Document doc = Document(r"xxxx.docx") print(doc.part.numbering_part) The following issues have occurred Traceback (most recent call last): File "x.py", line 4, in
Open Graph Description: the simple code from docx import Document doc = Document(r"xxxx.docx") print(doc.part.numbering_part) The following issues have occurred Traceback (most recent call last): File "x.py", line 4, in <...
X Description: the simple code from docx import Document doc = Document(r"xxxx.docx") print(doc.part.numbering_part) The following issues have occurred Traceback (most recent call last): File "x.py...
Opengraph URL: https://github.com/python-openxml/python-docx/issues/1313
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"NumberingPart.new NotImplementedError","articleBody":"the simple code\r\n```python\r\nfrom docx import Document\r\n\r\ndoc = Document(r\"xxxx.docx\")\r\nprint(doc.part.numbering_part)\r\n```\r\nThe following issues have occurred\r\n```\r\nTraceback (most recent call last):\r\n File \"x.py\", line 4, in \u003cmodule\u003e\r\n print(doc.part.numbering_part)\r\n File \"\\mars-win-amd64-python3.9\\lib\\site-packages\\docx\\shared.py\", line 242, in __get__\r\n value = self._fget(obj)\r\n File \"\\mars-win-amd64-python3.9\\lib\\site-packages\\docx\\parts\\document.py\", line 99, in numbering_part\r\n numbering_part = NumberingPart.new()\r\n File \"\\mars-win-amd64-python3.9\\lib\\site-packages\\docx\\parts\\numbering.py\", line 15, in new\r\n raise NotImplementedError\r\nNotImplementedError\r\n```\r\nAfter investigation, it was found that the 'NumberingPart. new()' used in the 'numbing_part' did not implement the function.\r\n\r\nThe following is the code used by 'NumberingPart.new()'\r\n```python\r\n\r\n\r\nclass NumberingPart(XmlPart):\r\n \"\"\"Proxy for the numbering.xml part containing numbering definitions for a document\r\n or glossary.\"\"\"\r\n\r\n @classmethod\r\n def new(cls):\r\n \"\"\"Return newly created empty numbering part, containing only the root\r\n ``\u003cw:numbering\u003e`` element.\"\"\"\r\n raise NotImplementedError\r\n\r\n```","author":{"url":"https://github.com/KaHuier","@type":"Person","name":"KaHuier"},"datePublished":"2023-12-12T03:31:29.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/1313/python-docx/issues/1313"}
| 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:975b2e14-5bc6-a388-5bd6-18ddfdfe06ef |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9790:20EAB8:156C7AC:1C75BCF:696F023E |
| html-safe-nonce | 8f8255e813e2a6ebc02f8fc99ce472e83db9f891219eb0d8eade24fcbbc8f8bb |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NzkwOjIwRUFCODoxNTZDN0FDOjFDNzVCQ0Y6Njk2RjAyM0UiLCJ2aXNpdG9yX2lkIjoiMjQ5MDkxMzQ4MjQ3OTY5ODQ5NCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 86b623567e4a815bbc3755b42c554f0e10a36a9c666228ebe807c65289e82256 |
| hovercard-subject-tag | issue:2036906132 |
| 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/1313/issue_layout |
| twitter:image | https://opengraph.githubassets.com/86ea2eecc5fa8cb71fee2102c24e8ff142421423d63f6d5adcd1cdbc43a6ae20/python-openxml/python-docx/issues/1313 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/86ea2eecc5fa8cb71fee2102c24e8ff142421423d63f6d5adcd1cdbc43a6ae20/python-openxml/python-docx/issues/1313 |
| og:image:alt | the simple code from docx import Document doc = Document(r"xxxx.docx") print(doc.part.numbering_part) The following issues have occurred Traceback (most recent call last): File "x.py", line 4, in <... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | KaHuier |
| hostname | github.com |
| expected-hostname | github.com |
| None | b278ad162d35332b6de714dfb005de04386c4d92df6475522bef910f491a35ee |
| 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 | 39aed5006635ab6f45e6b77d23e73b08a00272a3 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width