jamiemcg / Remarkable

Remarkable - The Markdown Editor for Linux http://remarkableapp.github.io
MIT License
1.96k stars 226 forks source link

Crashes on startup #375

Closed variadico closed 2 weeks ago

variadico commented 3 years ago

Remarkable crashes on startup.

I installed via the AUR. Whenever I try to launch via the Gnome app launcher, I get these errors.

$ journalctl -f
11:21:41 remarkable.desktop[10196]: /usr/lib/python3.9/site-packages/pdfkit/source.py:11: SyntaxWarning: "is" with a literal. Did you mean "=="?
11:21:41 remarkable.desktop[10196]:   if self.type is 'file':
11:21:41 remarkable.desktop[10196]: *Spellchecking not enabled.
11:21:41 remarkable.desktop[10196]: *To enable spellchecking install python-gtkspellcheck.
11:21:41 remarkable.desktop[10196]: pacman -S --asdeps python-gtkspellcheck
11:21:41 remarkable.desktop[10196]: Traceback (most recent call last):
11:21:41 remarkable.desktop[10196]:   File "/usr/bin/remarkable", line 66, in <module>
11:21:41 remarkable.desktop[10196]:     remarkable.main()
11:21:41 remarkable.desktop[10196]:   File "/usr/lib/python3.9/site-packages/remarkable/__init__.py", line 49, in main
11:21:41 remarkable.desktop[10196]:     window = RemarkableWindow.RemarkableWindow()
11:21:41 remarkable.desktop[10196]:   File "/usr/lib/python3.9/site-packages/remarkable_lib/Window.py", line 52, in __new__
11:21:41 remarkable.desktop[10196]:     builder = get_builder('RemarkableWindow')
11:21:41 remarkable.desktop[10196]:   File "/usr/lib/python3.9/site-packages/remarkable_lib/helpers.py", line 48, in get_builder
11:21:41 remarkable.desktop[10196]:     builder.add_from_file(ui_filename)
11:21:41 remarkable.desktop[10196]:   File "/usr/lib/python3.9/site-packages/remarkable_lib/Builder.py", line 92, in add_from_file
11:21:41 remarkable.desktop[10196]:     ele_widgets = tree.getiterator("object")
11:21:41 remarkable.desktop[10196]: AttributeError: 'ElementTree' object has no attribute 'getiterator'

This is what I get when I try to check the version.

$ remarkable --version
/usr/lib/python3.9/site-packages/pdfkit/source.py:11: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if self.type is 'file':
*Spellchecking not enabled.
*To enable spellchecking install python-gtkspellcheck.
pacman -S --asdeps python-gtkspellcheck
remarkable 1.87
nxemard commented 3 years ago

Hi, same here, Python 3.9 seems to be common in this bug ~$remarkable /usr/lib/python3/dist-packages/pdfkit/source.py:11: SyntaxWarning: "is" with a literal. Did you mean "=="? if self.type is 'file': *Spellchecking not enabled. *To enable spellchecking install pygtkspellcheck *https://pypi.python.org/pypi/pygtkspellcheck/ Traceback (most recent call last): File "/usr/bin/remarkable", line 66, in <module> remarkable.main() File "/usr/lib/python3/dist-packages/remarkable/__init__.py", line 49, in main window = RemarkableWindow.RemarkableWindow() File "/usr/lib/python3/dist-packages/remarkable_lib/Window.py", line 52, in __new__ builder = get_builder('RemarkableWindow') File "/usr/lib/python3/dist-packages/remarkable_lib/helpers.py", line 48, in get_builder builder.add_from_file(ui_filename) File "/usr/lib/python3/dist-packages/remarkable_lib/Builder.py", line 92, in add_from_file ele_widgets = tree.getiterator("object") AttributeError: 'ElementTree' object has no attribute 'getiterator'

$remarkable --version /usr/lib/python3/dist-packages/pdfkit/source.py:11: SyntaxWarning: "is" with a literal. Did you mean "=="? if self.type is 'file': *Spellchecking not enabled. *To enable spellchecking install pygtkspellcheck *https://pypi.python.org/pypi/pygtkspellcheck/ remarkable 1.87

$cat /etc/debian_version bullseye/sid

Any workaround ?

Thank you

variadico commented 3 years ago

If installing via the AUR, then try the -git version of this package. https://aur.archlinux.org/packages/remarkable-git

Worked for me. I guess the non-git version is just outdated.

thierrybo commented 3 years ago

Same issue from Debian Testing

neteler commented 2 years ago

Dirty hack:

diff -ru /usr/lib/python3.9/site-packages/remarkable_lib/Builder.py.orig /usr/lib/python3.9/site-packages/remarkable_lib/Builder.py
--- /usr/lib/python3.9/site-packages/remarkable_lib/Builder.py.orig 2021-12-01 23:30:33.036956591 +0100
+++ /usr/lib/python3.9/site-packages/remarkable_lib/Builder.py  2021-12-01 23:30:55.301889319 +0100
@@ -89,7 +89,7 @@
         tree = ElementTree()
         tree.parse(filename)

-        ele_widgets = tree.getiterator("object")
+        ele_widgets = tree.iter("object")
         for ele_widget in ele_widgets:
             name = ele_widget.attrib['id']
             widget = self.get_object(name)
@@ -111,7 +111,7 @@
             if connections:
                 self.connections.extend(connections)

-        ele_signals = tree.getiterator("signal")
+        ele_signals = tree.iter("signal")
         for ele_signal in ele_signals:
             self.glade_handler_dict.update(
             {ele_signal.attrib["handler"]: None})

See also dupe in #382