GermainZ / weechat-vimode

A WeeChat script that adds vi-like modes, commands and keybindings.
GNU General Public License v3.0
266 stars 28 forks source link

Latest version crashing #66

Closed sQVe closed 6 years ago

sQVe commented 6 years ago

Before anything else I'd like to give a huge thank you for creating this plugin. It's really awesome!

Yesterday I noticed that the vimode version provided by /script install vimode.py is behind on a lot of commits and I tried to manually upgrade vimode.py (using the following file https://github.com/GermainZ/weechat-vimode/blob/c0f35981b048fa07b5984ba33839655c522b9fd5/vimode.py). Some of the changes does play well with my setup, I've tried debugging it but falling a bit short. This is the output I'm getting:

python: stdout/stderr (?):   File "/home/sqve/.weechat/python/autoload/vimode.py", line 1081
python: stdout/stderr (notify_send):   File "/home/sqve/.weechat/python/autoload/vimode.py", line 1081
python: stdout/stderr (?):     class UMParser(metaclass=ABCMeta):
python: stdout/stderr (notify_send):     class UMParser(metaclass=ABCMeta):
python: stdout/stderr (?):                             ^
python: stdout/stderr (notify_send):                             ^
python: stdout/stderr (?): SyntaxError: invalid syntax
python: stdout/stderr (notify_send): SyntaxError: invalid syntax
python: unable to parse file "/home/sqve/.weechat/python/autoload/vimode.py"
python scripts loaded: autosort, notify_send, slack
GermainZ commented 6 years ago

Glad you like vimode :) Thanks for reporting the issue, testing Py2 support slipped my mind. 1da5a2e1c02d21bdada2dd76584a824df53bc4de should fix this.

@bbugyi200 could you please check I didn't do anything silly that might break some functionality (commit diff)? I'm not 100% familiar with some of the Python3-specific syntax you were using.

sQVe commented 6 years ago

@GermainZ

Like is an understatement. I use it daily for IRC and Slack, and it has helped out immensely.

I was pretty sure it was something that was faulty at my end but good that this will be fixed. I debugged for quite a bit but I'm not well versed in Python.

bbugyi200 commented 6 years ago

@GermainZ Looks good to me. I'm not sure how I would go about forcing WeeChat to use python2 so I can properly test this but I ran everything through a python2 interpreter and it looks like it checks out.

I forgot to consider Python2 support. Honestly all of that ABCMeta abstract class stuff is completely cosmetic anyway. I just figured it made my intent clearer.

sQVe commented 6 years ago

The latest version now works for me. Closing.