Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Getting "ValueError: invalid literal for int() with base 10" error when access section's margin #1539

Open
@YaroslavDrovolskyi

Description

@YaroslavDrovolskyi

Using python-docx 1.2.0, I get this error when accesssection.right_margin:

  File "docx\section.py", line 226, in right_margin  File "docx\oxml\section.py", line 370, in right_margin  File "docx\oxml\xmlchemy.py", line 193, in get_attr_value  File "docx\oxml\simpletypes.py", line 27, in from_xml  File "docx\oxml\simpletypes.py", line 402, in convert_from_xmlValueError: invalid literal for int() with base 10: '0.218505859375'

Meanwhile, Word'sdocument.xml contains following:

...<w:sectPr>    ...    <w:pgMar w:bottom="0" w:top="1114.400634765625" w:left="0" w:right="0.218505859375" w:header="0" w:footer="720"/></w:sectPr>...

This probles is similar to issues#1335 and#1475 which were resolved.
I would be grateful if you could suggest a solution to get around this. Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2026 Movatter.jp