matthewwithanm / matthewwithanm/python-markdownify
ImageBlockConverter.convert_img() got an unexpected keyword argument 'parent_tags'
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2.2k
- Forks
- 203
- PR merge metrics
- No merged PRs in 30d
Description
I've got an issue by user markdownify
File "/var/www/.../python-venv/lib/python3.12/site-packages/markdownify/init.py", line 223, in convert
return self.convert_soup(soup)
^^^^^^^^^^^^^^^^^^^^^^^
File "/var/www/.../python-venv/lib/python3.12/site-packages/markdownify/init.py", line 226, in convert_soup
return self.process_tag(soup, parent_tags=set())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/var/www/.../python-venv/lib/python3.12/site-packages/markdownify/init.py", line 288, in process_tag
self.process_element(el, parent_tags=parent_tags_for_children)
File "/var/www/.../python-venv/lib/python3.12/site-packages/markdownify/init.py", line 232, in process_element
return self.process_tag(node, parent_tags=parent_tags)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/var/www/.../python-venv/lib/python3.12/site-packages/markdownify/init.py", line 288, in process_tag
self.process_element(el, parent_tags=parent_tags_for_children)
File "/var/www/.../python-venv/lib/python3.12/site-packages/markdownify/init.py", line 232, in process_element
return self.process_tag(node, parent_tags=parent_tags)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/var/www/.../python-venv/lib/python3.12/site-packages/markdownify/init.py", line 324, in process_tag
text = convert_fn(node, text, parent_tags=parent_tags)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: ImageBlockConverter.convert_img() got an unexpected keyword argument 'parent_tags'
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read markdownify/init.py around process_tag and ImageBlockConverter.convert_img, then reproduce the HTML-to-Markdown conversion shown in the traceback. Done means image conversion no longer raises a TypeError about the parent_tags keyword and existing conversion behavior remains intact.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100