taskwiki
taskwiki copied to clipboard
Cannot get taskwikigrid to work even though vim-taskwarrior is installed
running :TaskWikiGrid
"task next report" 0L, 0C
Error detected while processing :
Traceback (most recent call last):
File "
relevant .vimrc stuff: set swapfile set dir=~/tmp let $TMPDIR = $HOME."/tmp" set shell=/bin/bash
I'm using fish shell if it matters, on ubuntu 16.04
Does vim-taskwarrior work when you use it directly?
Yes sir. Not sure what report your grid function is calling in vim-taskwarrior but the default :TW pulls up a grid of sorts and works just fine.
Taskwiki calls: TW rc:/path/to/.taskrc rc.context: , see the source code.
@arooni Did you resolve this issue in the end?
I'm also seeing this. I modified the grid function to show me variables like so:
if port:
print("rc:", port.tw.taskrc_location)
print("filter:", port.raw_filter)
print("command:", "TW rc:{0} rc.context: {1}"
.format(port.tw.taskrc_location, port.raw_filter))
vim.command("TW rc:{0} rc.context: {1}"
.format(port.tw.taskrc_location, port.raw_filter))
else:
And after a :TaskWikiGrid i see:
rc: /Users/sophacles/.taskrc
filter: -DELETED -PARENT ( project:columbia_st )
command: TW rc:/Users/sophacles/.taskrc rc.context: -DELETED -PARENT ( project:columbia_st )
Error detected while processing :
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/Users/sophacles/.vim/bundle/taskwiki/taskwiki/errors.py", line 26, in wrapped_function
original_function(*args, **kwargs)
File "/Users/sophacles/.vim/bundle/taskwiki/taskwiki/main.py", line 157, in grid
.format(port.tw.taskrc_location, port.raw_filter))
vim.error: Vim(let):E484: Can't open file /var/folders/9j/4pr6_hf111gcyjjr60z_vls00000gn/T/vhejUp7/5
When I manually run:
:TW rc:/Users/sophacles/.taskrc rc.context: -DELETED -PARENT ( project:columbia_st )
I get the same Vim error about missing files. But when I manually run:
:TW rc:/Users/sophacles/.taskrc 'rc.context: -DELETED -PARENT ( project:columbia_st )'
I get the grid.
Changing line 152 of main.py to:
vim.command("TW rc:{0} 'rc.context: {1}'"
.format(port.tw.taskrc_location, port.raw_filter))
Fixes :TaskWikiGrid for this situation.
Update: my fix only partially works... it stops the error, but doesn't filter the rc.context: portion correctly. The problem seems to be with the ( and ). If i change the grid function to look like this:
if port:
vim.command("TW rc:{0} rc.context: {1}"
.format(port.tw.taskrc_location, port.raw_filter).replace('(', '').replace(")", ""))
The filter is correctly applied.
I can confirm both the issue and this fix.
@sophacles @do0g What about converting this into a pull request?
Just started using this app again; would love to have this part of the app working