Open justyns opened 10 months ago
Thanks for reporting. It seems quite a logical error when first setting up a mapping. I didn't run yet in this error, because my setup has grown 'organically' and the swimlanes uda was apparently already present in my taskwarrior setup when I added this code.
I've made a quick fix (hopefully) in this branch. Hopefully it solves your problem.
Just for context: although I use kanboard_taskwarrior on a daily basis, it still has some quirks. I didn't robustly tested it on pristine setups, and I can also imagine some project setups may cause unexpected mapping problems.
Hey, thanks for the quick fix! I can confirm that branch fixes the KeyError I ran into.
Are there any other initial setup steps that might be missing from the docs? I got a new error about the board not existing. I'll probably try to look through the code this weekend to see if I'm missing something obvious
Just for context: although I use kanboard_taskwarrior on a daily basis, it still has some quirks. I didn't robustly tested it on pristine setups, and I can also imagine some project setups may cause unexpected mapping problems.
No worries! I'm not planning on using it for anything critical, just some personal and homelab stuff. Sometimes I like having a kanban view, but I also like taskwarrior.
@strawpants an update
I got this error when trying to add a new connection:
Traceback (most recent call last):
File "/home/justyns/.pyenv/versions/3.11.2/bin/tasksync.py", line 111, in <module>
main(sys.argv)
File "/home/justyns/.pyenv/versions/3.11.2/bin/tasksync.py", line 86, in main
conn.config(args.project)
File "/home/justyns/.pyenv/versions/3.11.2/lib/python3.11/site-packages/kanboard_taskwarrior/db.py", line 199, in config
cur.execute(f"INSERT INTO {kbserverTable} (url,user,apitoken,project,projid,lastsync,mapping,runtaskdsync) VALUES (?,?,?,?,?,?,?,?)",values)
sqlite3.OperationalError: table kbserver has no column named runtaskdsync
For some reason, the runtaskdsync column didn't exist yet. I saw there is a migration for it in db.py, but I guess it didn't run? I ended up just manually adding the column and it was fine after that.
Once I got the connection added, I ran into this error:
tasksync-DEBUG:Creating new Taskwarrior task from Kanboard task 205
Traceback (most recent call last):
File "/home/justyns/.pyenv/versions/3.11.2/bin/tasksync.py", line 111, in <module>
main(sys.argv)
File "/home/justyns/.pyenv/versions/3.11.2/bin/tasksync.py", line 107, in main
conn.syncTasks(args.project)
File "/home/justyns/.pyenv/versions/3.11.2/lib/python3.11/site-packages/kanboard_taskwarrior/db.py", line 284, in syncTasks
self.syncSingle(entry)
File "/home/justyns/.pyenv/versions/3.11.2/lib/python3.11/site-packages/kanboard_taskwarrior/db.py", line 420, in syncSingle
uuid,twtask=twFromkbTask(kbtask,projconf=projconf,twtask=twtask,twclient=twclnt,test=self._test)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/justyns/.pyenv/versions/3.11.2/lib/python3.11/site-packages/kanboard_taskwarrior/taskmap.py", line 36, in twFromkbTask
datedue=int(kbtask['date_due'])
^^^^^^^^^^^^^^^^^^^^^^^
TypeError: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
I changed taskmap.py line 36 to be datedue=int(kbtask['date_due'] or 0)
. kbtask['date_due']
was None for me, probably because I don't really use due dates in kanboard very often.
And I'm happy to say syncing both ways seems to be working correctly now :)
I ran into #1 as well, but after putting in my username to get passed that, I also ran into this error:
Python deps:
Kanboard and php version: