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

retext crashes when in preview mode the links points to a non existing file #552

Closed
nnss opened this issue Mar 18, 2021 · 1 comment
Closed

Comments

@nnss
Copy link

nnss commented Mar 18, 2021

I created the link in a file in Markdown syntax as

* [Servers](servers)

The preview shows that ok, but when I click on the link, the program crashes and the output is:

matias@aserulo:~$ retext 
Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
Using configuration file: /home/matias/.config/ReText project/ReText.conf
Traceback (most recent call last):
  File "/usr/share/retext/ReText/preview.py", line 44, in openInternal
    if self.tab.openSourceFile(fileToOpen):
  File "/usr/share/retext/ReText/tab.py", line 473, in openSourceFile
    if self.promptFileCreation(fileToOpen):
  File "/usr/share/retext/ReText/tab.py", line 483, in promptFileCreation
    self.tr("The file '%s' does not exist.\n\nDo you want to create it?") % fileToCreate,
TypeError: not all arguments converted during string formatting
Process Process-1:
Traceback (most recent call last):
  File "/usr/lib/python3.9/multiprocessing/process.py", line 315, in _bootstrap
    self.run()
  File "/usr/lib/python3.9/multiprocessing/process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/share/retext/ReText/converterprocess.py", line 72, in _converter_process_func
    job = receiveObject(conn_child)
  File "/usr/share/retext/ReText/converterprocess.py", line 41, in receiveObject
    sizeBuf = recvall(sock, 4)
  File "/usr/share/retext/ReText/converterprocess.py", line 34, 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?
Abortado

This only happens when the LANG/LANGUAGE environment variables are set to es_AR.UTF-8, as a workaround I can open the program without those variables, and works fine (ask to create the file without crashing)

Version: 7.2.0
PyMarkups 3.1.0

Debian package info:

Package: retext
Version: 7.2.0-1
Priority: optional
Section: editors
Maintainer: Dmitry Shachnev <mitya57@debian.org>
Installed-Size: 706 kB
Depends: python3-markups (>= 2.0), python3-pyqt5, python3-pyqt5.qtwebkit, python3-chardet, python3-docutils, python3-markdown (>= 3.0), python3-pygments, python3:any
Recommends: docutils-common (>= 0.10-3~), python3-enchant, shared-mime-info (>= 0.91)
Suggests: adwaita-icon-theme, gir1.2-glib-2.0, gsettings-desktop-schemas
Breaks: retext-wpgen (<< 4.0~)
Replaces: retext-wpgen (<< 4.0~)
Homepage: https://github.com/retext-project/retext
Tag: implemented-in::python, interface::graphical, interface::x11,
 role::program, uitoolkit::qt, use::editing, use::text-formatting,
 works-with-format::html, works-with-format::odf,
 works-with-format::pdf, works-with::text, x11::application
Download-Size: 146 kB
APT-Manual-Installed: yes
APT-Sources: http://deb.debian.org/debian testing/main amd64 Packages
Description: Simple text editor for Markdown and reStructuredText
@mitya57
Copy link
Member

mitya57 commented Mar 18, 2021

Fixed, thanks for your bug report!

I will also try to do a new Debian package upload soon (but it will take 20 days to migrate to testing, per the freeze policy).

mitya57 added a commit that referenced this issue Oct 11, 2021
Fixes #552.

(cherry picked from commit 45b63bb)
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

2 participants