Error invoking LeetCodeList
Error detected while processing function leetcode#ListProblems:
line 30:
E121: Undefined variable: s:topics_and_companies
E15: Invalid expression: s:topics_and_companies['topics']
Could you describe how you triggered this error?
Yes. In neovim, after successfully installing the plugin, I failed to :LeetCodeList with the error above. The same error happened even after a manual :LeetCodeSignIn beforehand.
Hi, I tried on my own laptop and didn't find this problem. You could try to update the plugin to the newest version and see if it works.
I also use this plugin with neovim which version is 0.4.2. I know it has login problem. And another problem is when I submit problem and the answer is wrong, it will not function well. @ianding1 Do you use nvim or vim?
I'll look into it
@ianding1 I also had start to learn writing vim plugin several days ago. This is a very useful plugin,and I also want to add some feature, such as top like list. Thanks for your hardworking.
Hi zhoupro,
I repeated on Ubuntu 18.04 and found an issue in python-keyring. I'm not sure if it's the very bug that you met:
The bug occurred when I tried to sign in. It printed some errors about python-keyring. Part of it is:
raise InitError("Failed to unlock the collection!")
keyring.errors.InitError: Failed to unlock the collection!
The way to fix it is to create a file ~/.local/share/python_keyring/keyringrc.cfg with the content:
[backend]
default-keyring=keyring.backends.Gnome.Keyring
The solution was proposed in this thread.
I can use the plugin normally after creating the file.
Please tell me if you still have issues. If so, any additional information such as screenshots or error messages would be very helpful.
@ianding1 I try it again, thanks.
@ianding1 Yes, after create ~/.local/share/python_keyring/keyringrc.cfg, The problem is solved.
same issue
in nvim of macos. After install the plungin successfully, I only call :LeetCodeList successfully once. And then there is always the same error
Error detected while processing function leetcode#ListProblems: line 30: E121: Undefined variable: s:topics_and_companies E15: Invalid expression: s:topics_and_companies['topics']
In Ubuntu 18.04 and neovim v0.4.2 , I'm having the same error (after sign in).
For me, the problem is, if I use the "~/.local/share/python_keyring/keyringrc.cfg" solution, I get an error as below and I can't even log in: browser_cookie3 not installed: pip3 install browser_cookie3 --user
I think this is because:
#### without the "keyringrc.cfg" solution ####
$ keyring --list-backends
keyring.backends.fail.Keyring (priority: 0)
keyring.backends.SecretService.Keyring (priority: 5)
keyring.backends.chainer.ChainerBackend (priority: 10)
keyrings.alt.file.EncryptedKeyring (priority: 0.6)
keyrings.alt.file.PlaintextKeyring (priority: 0.5)
#### with the "keyringrc.cfg" solution ####
$ keyring --list-backends
....
ModuleNotFoundError: No module named 'keyring.backends.Gnome'
For information, keyring
$ pip3 list | grep keyring
DEPRECATION: The default format will switch to columns in the future. You can use --format=(legacy|columns) (or define a format=(legacy|columns) in your pip.conf under the [list] section) to disable this warning.
keyring (21.1.0)
keyrings.alt (3.4.0)