michael-lazar / rtv

Browse Reddit from your terminal
MIT License
4.65k stars 278 forks source link

Crash while trying to open a submission link #714

Open sashaafm opened 4 years ago

sashaafm commented 4 years ago

Describe the bug Just tried to open a given link in the browser with the o key and it crashed.

Describe your environment

Stack trace

rtv version: rtv 1.27.0
rtv module path: /usr/local/Cellar/rtv/1.27.0_1/libexec/lib/python3.8/site-packages/rtv/__main__.py
python version: 3.8.1 (default, Dec 27 2019, 18:06:00)  [Clang 11.0.0 (clang-1100.0.33.16)]
python executable: /usr/local/Cellar/rtv/1.27.0_1/libexec/bin/python3.8
praw version: packaged, commit 1656ec224e57
locale, encoding: C/UTF-8/C/C/C/C, UTF-8
Environment Variables
  BROWSER         :
  DISPLAY         :
  EDITOR          : vim
  LANG            :
  PAGER           : less
  RTV_BROWSER     :
  RTV_EDITOR      :
  RTV_PAGER       :
  RTV_URLVIEWER   :
  TERM            : screen-256color
  VISUAL          :
  XDG_CONFIG_HOME :
  XDG_DATA_HOME   :

Traceback (most recent call last):
  File "/usr/local/Cellar/rtv/1.27.0_1/libexec/lib/python3.8/site-packages/rtv/__main__.py", line 255, in main
    page = page.loop()
  File "/usr/local/Cellar/rtv/1.27.0_1/libexec/lib/python3.8/site-packages/rtv/page.py", line 94, in loop
    self.controller.trigger(ch)
  File "/usr/local/Cellar/rtv/1.27.0_1/libexec/lib/python3.8/site-packages/rtv/objects.py", line 604, in trigger
    return func(self.instance, *args, **kwargs)
  File "/usr/local/Cellar/rtv/1.27.0_1/libexec/lib/python3.8/site-packages/rtv/subreddit_page.py", line 185, in open_link
    self.term.open_link(data['url_full'])
  File "/usr/local/Cellar/rtv/1.27.0_1/libexec/lib/python3.8/site-packages/rtv/terminal.py", line 453, in open_link
    self.open_browser(url)
  File "/usr/local/Cellar/rtv/1.27.0_1/libexec/lib/python3.8/site-packages/rtv/terminal.py", line 615, in open_browser
    p.start()
  File "/usr/local/Cellar/python@3.8/3.8.1/Frameworks/Python.framework/Versions/3.8/lib/python3.8/multiprocessing/process.py", line 121, in start
    self._popen = self._Popen(self)
  File "/usr/local/Cellar/python@3.8/3.8.1/Frameworks/Python.framework/Versions/3.8/lib/python3.8/multiprocessing/context.py", line 224, in _Popen
    return _default_context.get_context().Process._Popen(process_obj)
  File "/usr/local/Cellar/python@3.8/3.8.1/Frameworks/Python.framework/Versions/3.8/lib/python3.8/multiprocessing/context.py", line 283, in _Popen
    return Popen(process_obj)
  File "/usr/local/Cellar/python@3.8/3.8.1/Frameworks/Python.framework/Versions/3.8/lib/python3.8/multiprocessing/popen_spawn_posix.py", line 32, in __init__
    super().__init__(process_obj)
  File "/usr/local/Cellar/python@3.8/3.8.1/Frameworks/Python.framework/Versions/3.8/lib/python3.8/multiprocessing/popen_fork.py", line 19, in __init__
    self._launch(process_obj)
  File "/usr/local/Cellar/python@3.8/3.8.1/Frameworks/Python.framework/Versions/3.8/lib/python3.8/multiprocessing/popen_spawn_posix.py", line 47, in _launch
    reduction.dump(process_obj, fp)
  File "/usr/local/Cellar/python@3.8/3.8.1/Frameworks/Python.framework/Versions/3.8/lib/python3.8/multiprocessing/reduction.py", line 60, in dump
    ForkingPickler(file, protocol).dump(obj)
AttributeError: Can't pickle local object 'Terminal.open_browser.<locals>.open_url_silent'

rtv has crashed. Please report this traceback at:
https://github.com/michael-lazar/rtv/issues
jaykelly450 commented 4 years ago

Same here. Using lynx on OSX 10.15.3.

rtv version: rtv 1.27.0
rtv module path: /usr/local/Cellar/rtv/1.27.0_1/libexec/lib/python3.8/site-packages/rtv/__main__.py
python version: 3.8.1 (default, Dec 27 2019, 18:06:00)  [Clang 11.0.0 (clang-1100.0.33.16)]
python executable: /usr/local/Cellar/rtv/1.27.0_1/libexec/bin/python3.8
praw version: packaged, commit 1656ec224e57
locale, encoding: en_US.UTF-8, UTF-8
Environment Variables
  BROWSER         : /usr/local/bin/lynx
  DISPLAY         : /private/tmp/com.apple.launchd.Kkqo3BxSm0/org.macosforge.xquartz:0
  EDITOR          : vim
  LANG            : en_US.UTF-8
  PAGER           :
  RTV_BROWSER     :
  RTV_EDITOR      :
  RTV_PAGER       :
  RTV_URLVIEWER   :
  TERM            : screen-256color
  VISUAL          :
  XDG_CONFIG_HOME :
  XDG_DATA_HOME   :

Traceback (most recent call last):
  File "/usr/local/Cellar/rtv/1.27.0_1/libexec/lib/python3.8/site-packages/rtv/__main__.py", line 255, in main
    page = page.loop()
  File "/usr/local/Cellar/rtv/1.27.0_1/libexec/lib/python3.8/site-packages/rtv/page.py", line 94, in loop
    self.controller.trigger(ch)
  File "/usr/local/Cellar/rtv/1.27.0_1/libexec/lib/python3.8/site-packages/rtv/objects.py", line 604, in trigger
    return func(self.instance, *args, **kwargs)
  File "/usr/local/Cellar/rtv/1.27.0_1/libexec/lib/python3.8/site-packages/rtv/subreddit_page.py", line 185, in open_link
    self.term.open_link(data['url_full'])
  File "/usr/local/Cellar/rtv/1.27.0_1/libexec/lib/python3.8/site-packages/rtv/terminal.py", line 453, in open_link
    self.open_browser(url)
  File "/usr/local/Cellar/rtv/1.27.0_1/libexec/lib/python3.8/site-packages/rtv/terminal.py", line 615, in open_browser
    p.start()
  File "/usr/local/Cellar/python@3.8/3.8.1/Frameworks/Python.framework/Versions/3.8/lib/python3.8/multiprocessing/process.py", line 121, in start
    self._popen = self._Popen(self)
  File "/usr/local/Cellar/python@3.8/3.8.1/Frameworks/Python.framework/Versions/3.8/lib/python3.8/multiprocessing/context.py", line 224, in _Popen
    return _default_context.get_context().Process._Popen(process_obj)
  File "/usr/local/Cellar/python@3.8/3.8.1/Frameworks/Python.framework/Versions/3.8/lib/python3.8/multiprocessing/context.py", line 283, in _Popen
    return Popen(process_obj)
  File "/usr/local/Cellar/python@3.8/3.8.1/Frameworks/Python.framework/Versions/3.8/lib/python3.8/multiprocessing/popen_spawn_posix.py", line 32, in __init__
    super().__init__(process_obj)
  File "/usr/local/Cellar/python@3.8/3.8.1/Frameworks/Python.framework/Versions/3.8/lib/python3.8/multiprocessing/popen_fork.py", line 19, in __init__
    self._launch(process_obj)
  File "/usr/local/Cellar/python@3.8/3.8.1/Frameworks/Python.framework/Versions/3.8/lib/python3.8/multiprocessing/popen_spawn_posix.py", line 47, in _launch
    reduction.dump(process_obj, fp)
  File "/usr/local/Cellar/python@3.8/3.8.1/Frameworks/Python.framework/Versions/3.8/lib/python3.8/multiprocessing/reduction.py", line 60, in dump
    ForkingPickler(file, protocol).dump(obj)
AttributeError: Can't pickle local object 'Terminal.open_browser.<locals>.open_url_silent'

rtv has crashed. Please report this traceback at:
https://github.com/michael-lazar/rtv/issues
michael-lazar commented 4 years ago

See https://github.com/michael-lazar/rtv/issues/710