jalvesaq / zotcite

Neovim plugin for integration with Zotero
GNU General Public License v3.0
159 stars 13 forks source link

Multiple errors in WSL2 Manjaro - Probably path or package related #38

Closed acorreya closed 2 years ago

acorreya commented 2 years ago

I was trying to make zotcite run in vim and neovim inside a manjaro WSL2 install. This generally does not let any function to work execpt hiding zotero key on cursor.

VIM Error copied from the status line:

Error detected while processing function zotcite#Init[24]..zotcite#GlobalInit:
line 17:
Traceback (most recent call last):
Press ENTER or type command to continue
Error detected while processing function zotcite#Init[24]..zotcite#GlobalInit:
line 17:
File "<string>", line 1, in <module>
Press ENTER or type command to continue
Error detected while processing function zotcite#Init[24]..zotcite#GlobalInit:
line 17:
File "/home/ad/.vim/plugged/zotcite/python3/zotero.py", line 220, in __init__
Press ENTER or type command to continue
Error detected while processing function zotcite#Init[24]..zotcite#GlobalInit:
line 17:
self._get_zotero_prefs()
Press ENTER or type command to continue
Error detected while processing function zotcite#Init[24]..zotcite#GlobalInit:
line 17:
File "/home/ad/.vim/plugged/zotcite/python3/zotero.py", line 301, in _get_zotero_prefs
Press ENTER or type command to continue
File "/home/ad/.vim/plugged/zotcite/python3/zotero.py", line 301, in _get_zotero_prefs 
Press ENTER or type command to continue
Error detected while processing function zotcite#Init[24]..zotcite#GlobalInit:
line 17:
zotero_basedir = os.path.dirname(zp)
Press ENTER or type command to continue
Error detected while processing function zotcite#Init[24]..zotcite#GlobalInit: 
line 17: File "/usr/lib/python3.9/posixpath.py", line 152, in dirname 
Press ENTER or type command to continue
Error detected while processing function zotcite#Init[24]..zotcite#GlobalInit: 
line 17: p = os.fspath(p) 
Error detected while processing function zotcite#Init[24]..zotcite#GlobalInit: 
line 17: TypeError: expected str, bytes or os.PathLike object, not NoneType 
Press ENTER or type command to continue
Error detected while processing function zotcite#Init[24]..zotcite#GlobalInit[27]..function zotcite#Init[24]..zotcite#GlobalInit:line 21: 
Traceback (most recent call last): 
Press ENTER or type command to continue 
Error detected while processing function zotcite#Init[24]..zotcite#GlobalInit[27]..function zotcite#Init[24]..zotcite#GlobalInit:line 21: 
File "<string>", line 1, in <module> 
Press ENTER or type command to continue 
Error detected while processing function zotcite#Init[24]..zotcite#GlobalInit[27]..function zotcite#Init[24]..zotcite#GlobalInit:line 21: 
NameError: name 'ZotCite' is not defined 
Press ENTER or type command to continue
Error detected while processing function zotcite#Init[24]..zotcite#GlobalInit[27]..function zotcite#Init[24]..zotcite#GlobalInit:line 21: 
E858: Eval did not return a valid python object
Press ENTER or type command to continue
line 24: E171: Missing :endif 
Press ENTER or type command to continue

Neovim Error copied from status line:

Error detected while processing function zotcite#Init[24]..zotcite#GlobalInit[17]..provider#python3#Call:
line   18: 
Error invoking 'python_execute' on channel 3 (python3-script-host):
Traceback (most recent call last):
File "<string>", line 1, in <module> 
File "/home/ad/.config/nvim/plugged/zotcite/python3/zotero.py", line 220, in __init__  
self._get_zotero_prefs() 
File "/home/ad/.config/nvim/plugged/zotcite/python3/zotero.py", line 301, in _get_zotero_prefs 
zotero_basedir = os.path.dirname(zp)
File "/usr/lib/python3.9/posixpath.py", line 152, in dirname
p = os.fspath(p) 
TypeError: expected str, bytes or os.PathLike object, not NoneType
Press ENTER or type command to continue 
Error detected while processing function zotcite#Init[24]..zotcite#GlobalInit[21]..provider#python3#Call:
line   18:
Error invoking 'python_eval' on channel 3 (python3-script-host):^@error caught in request handler 'python_eval ['ZotCite.Info()']':^@Traceback (most recent call last):^@  File "/home/ad/.local/lib/python3.9/site-packages/pynvim/plugin/script_host.py", line 167, in python_eval^@    return eval(expr, self.module.__dict__)^@  File "<string>", line 1, in <module>^@NameError: name 'ZotCite' is not defined 
Press ENTER or type command to continue      
Error detected while processing function zotcite#Init: 
line   24:     
E171: Missing :endif  
Press ENTER or type command to continue  
jalvesaq commented 2 years ago

I can't replicate the issue because I don't have a system similar to yours, but I could find a logical error near line 301. Could you update the plugin and try again, please?

acorreya commented 2 years ago

Thank you! You just saved my PHD! 👍