Skip to content

Got TypeError in copying system_message node [SF:patches:165] #647

@chrisjsewell

Description

@chrisjsewell

author: tk0miya
created: 2020-03-07 10:26:49.458000
assigned: None
SF_url: https://sourceforge.net/p/docutils/patches/165

I got TypeError on copying system_message node.

Reproducible code:

from docutils.nodes import system_message
system_message().copy()

Error:

$ python test.py
system_message: children=()
Traceback (most recent call last):
  File "test.py", line 2, in <module>
    system_message().copy()
  File "/Users/tkomiya/.pyenv/versions/3.8.1/lib/python3.8/site-packages/docutils/nodes.py", line 1066, in copy
    obj = self.__class__(rawsource=self.rawsource, **self.attributes)
  File "/Users/tkomiya/.pyenv/versions/3.8.1/lib/python3.8/site-packages/docutils/nodes.py", line 1785, in __init__
    Element.__init__(self, rawsource, *children, **attributes)
TypeError: __init__() got multiple values for argument 'rawsource'

commenter: tk0miya
posted: 2020-03-07 10:30:12.048000
title: #165 Got TypeError in copying system_message node

attachments:

I made a small fix for this error. Could you review this please?
Thanks,


commenter: milde
posted: 2020-03-14 17:05:47.488000
title: #165 Got TypeError in copying system_message node

  • status: open --> open-fixed

commenter: milde
posted: 2020-03-14 17:05:47.985000
title: #165 Got TypeError in copying system_message node

Applied in r8501. Thank you for the patch.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions