[opensuse] markdown retext error
A few days ago, I sought wisdom about redis. I've still to get that working fully and am trying to read the documentation. It's in markdown format, which I haven't used before. The web lists lots of possible ways to view (and mostly edit) markdown but most are not in openSUSE's standard repositories for some reason. So what do people recommend for viewing markdown files? In the meantime I picked retext as a simple way to do it and installed it. But when I run it, it briefly shows the text in a window and then crashes and dumps core: $ retext /usr/share/doc/packages/php7-redis/README.markdown Using configuration file: /home/dhoworth/.config/ReText project/ReText.conf Process Process-1: Traceback (most recent call last): File "/usr/lib64/python3.6/multiprocessing/process.py", line 258, in _bootstrap self.run() File "/usr/lib64/python3.6/multiprocessing/process.py", line 93, in run self._target(*self._args, **self._kwargs) File "/usr/lib/python3.6/site-packages/ReText/converterprocess.py", line 57, in _converter_process_func current_markup = markup_class(job['filename']) File "/usr/lib/python3.6/site-packages/markups/markdown.py", line 146, in __init__ self._apply_extensions() File "/usr/lib/python3.6/site-packages/markups/markdown.py", line 132, in _apply_extensions self.md = self.markdown.Markdown(extensions=extensions_final, output_format='html4') File "/usr/lib64/python3.6/site-packages/markdown/core.py", line 100, in __init__ configs=kwargs.get('extension_configs', {})) File "/usr/lib64/python3.6/site-packages/markdown/core.py", line 126, in registerExtensions ext = self.build_extension(ext, configs.get(ext, {})) File "/usr/lib64/python3.6/site-packages/markdown/core.py", line 166, in build_extension module = importlib.import_module(ext_name) File "/usr/lib64/python3.6/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 994, in _gcd_import File "<frozen importlib._bootstrap>", line 971, in _find_and_load File "<frozen importlib._bootstrap>", line 953, in _find_and_load_unlocked ModuleNotFoundError: No module named 'markups.mdx_mathjax(enable_dollar_delimiter=False)' Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/ReText/tab.py", line 233, in updatePreviewBox self.converted = self.converterProcess.get_result() File "/usr/lib/python3.6/site-packages/ReText/converterprocess.py", line 136, in get_result status, converted = receiveObject(self.conn) File "/usr/lib/python3.6/site-packages/ReText/converterprocess.py", line 24, in receiveObject sizeBuf = recvall(sock, 4) File "/usr/lib/python3.6/site-packages/ReText/converterprocess.py", line 17, in recvall raise EOFError('Received 0 bytes from socket while more bytes were expected. Did the sender process exit unexpectedly?') EOFError: Received 0 bytes from socket while more bytes were expected. Did the sender process exit unexpectedly? Aborted (core dumped) Have I done something extremely stupid or is this a bug I should report? And in the meantime can anyone interpret the traceback and give me a hint as to how to get retext to show me the document? I've also attached the dump as a file in hope it will be better-formatted.
Yes, Dave, I've had that sort of problem with Python time and time again. Its really turned me off from Python as as a programming language. On 2019-03-06 10:07 a.m., Dave Howorth wrote:
So what do people recommend for viewing markdown files?
Most MD files I encounter are either on the web or on my tablet. I've done some MD text work using RoR, specifically using markdown to do MD->HTML https://daringfireball.net/projects/markdown/ I'd trust perl as being more portable than Python, but that's just my experience. The context you are talking about then, yes, the simplest is to convert to HTML (if there are not embedded images needing carted about) and apart from markdown on your own machine there are a number of online pass-through tools for that. MD->HTML is pretty simple. Of course there is also pandoc which can convert just about anything to anything else: https://software.opensuse.org/package/pandoc It seems to be the swiss-army-knife of document conversion, so be wary. I understand there is also MD->PDF pass-through on the 'net but I've never tried that. If you use Chrome/chromium there is (?was?) a plug-in to allow MD to be read/converted directly. https://markdownlivepreview.com/ -- A: Yes. > Q: Are you sure? >> A: Because it reverses the logical flow of conversation. >>> Q: Why is top posting frowned upon? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Quoting Dave Howorth <dave@howorth.org.uk>:
A few days ago, I sought wisdom about redis. I've still to get that working fully and am trying to read the documentation. It's in markdown format, which I haven't used before. The web lists lots of possible ways to view (and mostly edit) markdown but most are not in openSUSE's standard repositories for some reason. So what do people recommend for viewing markdown files?
In the meantime I picked retext as a simple way to do it and installed it. But when I run it, it briefly shows the text in a window and then crashes and dumps core:
There are many slight variants of Markdown. Pandoc, as someone mentioned, is a possibility. Or just learn to read Markdown. It's not a biggie. HTH, Jeffrey -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Wed, 6 Mar 2019 10:12:35 -0600 "Jeffrey L. Taylor" <jeff.taylor@ieee.org> wrote:
Quoting Dave Howorth <dave@howorth.org.uk>:
A few days ago, I sought wisdom about redis. I've still to get that working fully and am trying to read the documentation. It's in markdown format, which I haven't used before. The web lists lots of possible ways to view (and mostly edit) markdown but most are not in openSUSE's standard repositories for some reason. So what do people recommend for viewing markdown files?
In the meantime I picked retext as a simple way to do it and installed it. But when I run it, it briefly shows the text in a window and then crashes and dumps core:
There are many slight variants of Markdown. Pandoc, as someone mentioned, is a possibility. Or just learn to read Markdown. It's not a biggie.
HTH, Jeffrey
Thanks Jeffrey and Anton. I've bug-reported it as Bug 1128204. Yes I can muddle through just eyeballing the text. I already installed pandoc but want to concentrate on my redis problem, not learning another CLI. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Hello, On Wed, 06 Mar 2019, Dave Howorth wrote:
$ retext /usr/share/doc/packages/php7-redis/README.markdown [..] ModuleNotFoundError: No module named 'markups.mdx_mathjax(enable_dollar_delimiter=False)' [..] Have I done something extremely stupid or is this a bug I should report?
Your missing a part of python3-Markups. python3-Markups-3.x does not include that module in that form anymore, i.e. the file /usr/lib/python3.6/site-packages/markups/mdx_mathjax.py So, you need the python3-Markups-2.0.1 package for retext-6.x and python3-Markups-3.0.0 for retext-7.x. HTH, -dnh -- Sufficiently advanced incompetence is indistinguishable from malice. -- dima -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Thu, 7 Mar 2019 04:27:31 +0100 David Haller <dnh@opensuse.org> wrote:
Hello,
On Wed, 06 Mar 2019, Dave Howorth wrote:
$ retext /usr/share/doc/packages/php7-redis/README.markdown [..] ModuleNotFoundError: No module named 'markups.mdx_mathjax(enable_dollar_delimiter=False)' [..] Have I done something extremely stupid or is this a bug I should report?
Your missing a part of python3-Markups.
python3-Markups-3.x does not include that module in that form anymore, i.e. the file /usr/lib/python3.6/site-packages/markups/mdx_mathjax.py
So, you need the python3-Markups-2.0.1 package for retext-6.x and python3-Markups-3.0.0 for retext-7.x.
Thanks for the help but it isn't correct I'm afraid. Retext is the standard package 6.0.0-lp150.2.3.1-noarch from Leap 15 repositories and python3-Markups is 2.0.1-lp150.1.3 from the same place. Plus: # l /usr/lib/python3.6/site-packages/markups/mdx_mathjax.py -rw-r--r-- 1 root root 2426 Dec 13 2015 /usr/lib/python3.6/site-packages/markups/mdx_mathjax.py So whatever the reason is, it's not that file that is missing. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Thu, 7 Mar 2019 11:46:59 +0000 Dave Howorth <dave@howorth.org.uk> wrote:
On Thu, 7 Mar 2019 04:27:31 +0100 David Haller <dnh@opensuse.org> wrote:
Hello,
On Wed, 06 Mar 2019, Dave Howorth wrote:
$ retext /usr/share/doc/packages/php7-redis/README.markdown [..] ModuleNotFoundError: No module named 'markups.mdx_mathjax(enable_dollar_delimiter=False)' [..] Have I done something extremely stupid or is this a bug I should report?
Your missing a part of python3-Markups.
python3-Markups-3.x does not include that module in that form anymore, i.e. the file /usr/lib/python3.6/site-packages/markups/mdx_mathjax.py
So, you need the python3-Markups-2.0.1 package for retext-6.x and python3-Markups-3.0.0 for retext-7.x.
Thanks for the help but it isn't correct I'm afraid. Retext is the standard package 6.0.0-lp150.2.3.1-noarch from Leap 15 repositories and python3-Markups is 2.0.1-lp150.1.3 from the same place. Plus:
# l /usr/lib/python3.6/site-packages/markups/mdx_mathjax.py -rw-r--r-- 1 root root 2426 Dec 13 2015 /usr/lib/python3.6/site-packages/markups/mdx_mathjax.py
So whatever the reason is, it's not that file that is missing.
I reported this as https://bugzilla.suse.com/show_bug.cgi?id=1128204 but there seems to be some difficulty in reproducing it. So if there's any other ideas about possible causes or if anybody else can reproduce the symptoms I'd be very interested to know. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (4)
-
Anton Aylward
-
Dave Howorth
-
David Haller
-
Jeffrey L. Taylor