Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

not compatible with Markdown-3.4.1 #105

Open
jonashrem opened this issue Aug 19, 2022 · 3 comments
Open

not compatible with Markdown-3.4.1 #105

jonashrem opened this issue Aug 19, 2022 · 3 comments

Comments

@jonashrem
Copy link

With markdown-3.4.1 there is now longer etree

Traceback (most recent call last):
  File "mdv/bin/mdv", line 11, in <module>
    load_entry_point('mdv==1.7.4', 'console_scripts', 'mdv')()
  File "/opt/mdv/lib/python3.8/site-packages/pkg_resources/__init__.py", line 489, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/opt/mdv/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2852, in load_entry_point
    return ep.load()
  File "/opt/mdv/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2443, in load
    return self.resolve()
  File "/opt/mdv/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2449, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/opt/mdv/lib/python3.8/site-packages/mdv/__init__.py", line 3, in <module>
    from .markdownviewer import run, main
  File "/opt/mdv/lib/python3.8/site-packages/mdv/markdownviewer.py", line 160, in <module>
    from markdown.util import etree
ImportError: cannot import name 'etree' from 'markdown.util' (/opt/mdv/lib/python3.8/site-packages/markdown/util.py)

markdown 2.6 works fine

@dhondta
Copy link
Contributor

dhondta commented Sep 1, 2022

@jonashrem This was fixed with this commit but the new version of the package was not pushed to PyPi yet, hence pip install --upgrade mdv will give you the unfixed version 1.7.4 while pip install --upgrade git+https://github.com/axiros/terminal_markdown_viewer will make it.
I opened a PR for solving this but it shall still be pushed to PyPi by the author.

@iHnR
Copy link

iHnR commented Oct 23, 2022

@dhondta I'm still getting the same error after running the fixed command. The message seems to show that it's still installing 1.7.4

Defaulting to user installation because normal site-packages is not writeable
Collecting git+https://github.com/axiros/terminal_markdown_viewer
  Cloning https://github.com/axiros/terminal_markdown_viewer to /tmp/pip-req-build-zuvf2igl
  Running command git clone --filter=blob:none --quiet https://github.com/axiros/terminal_markdown_viewer /tmp/pip-req-build-zuvf2igl
  Resolved https://github.com/axiros/terminal_markdown_viewer to commit 435b6885d0237fe10a9f894375b10c1103bfaae0
  Preparing metadata (setup.py) ... done
Requirement already satisfied: markdown in /home/japie/.local/lib/python3.10/site-packages (from mdv==1.7.4) (3.4.1)
Requirement already satisfied: pygments in /usr/lib/python3/dist-packages (from mdv==1.7.4) (2.11.2)

@igorlima
Copy link

Using the argument to force reinstall helped me, at least. For further details about forcing the pip to reinstall the current version, see this StackOverflow page.

pip install --upgrade --force-reinstall git+https://github.com/axiros/terminal_markdown_viewer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants