-
Notifications
You must be signed in to change notification settings - Fork 57
Closed
Description
Describe the bug
I have redefined the Priority UDA in my config.
More precisely, I have the following two lines in my config:
uda.priority.type=numeric
uda.priority.label=Priority
and I have some tasks to which I have added an integer as a value for Priority (I am not sure if the problem exists if no tasks have any priority).
When you run vit, it gives the following error:
Traceback (most recent call last):
File "/usr/bin/vit", line 33, in <module>
sys.exit(load_entry_point('vit==2.0.0', 'console_scripts', 'vit')())
File "/usr/lib/python3.8/site-packages/vit-2.0.0-py3.8.egg/vit/command_line.py", line 5, in main
Application(options, filters)
File "/usr/lib/python3.8/site-packages/vit-2.0.0-py3.8.egg/vit/application.py", line 74, in __init__
self.refresh(False)
File "/usr/lib/python3.8/site-packages/vit-2.0.0-py3.8.egg/vit/application.py", line 896, in refresh
self.build_main_widget()
File "/usr/lib/python3.8/site-packages/vit-2.0.0-py3.8.egg/vit/application.py", line 944, in build_main_widget
self.update_report(self.report)
File "/usr/lib/python3.8/site-packages/vit-2.0.0-py3.8.egg/vit/application.py", line 919, in update_report
self.update_task_table()
File "/usr/lib/python3.8/site-packages/vit-2.0.0-py3.8.egg/vit/application.py", line 555, in update_task_table
self.table.update_data(self.reports[self.report], self.model.tasks)
File "/usr/lib/python3.8/site-packages/vit-2.0.0-py3.8.egg/vit/task_list.py", line 93, in update_data
self.build_rows()
File "/usr/lib/python3.8/site-packages/vit-2.0.0-py3.8.egg/vit/task_list.py", line 237, in build_rows
formatted_value = column['formatter'].format(task[column['name']], task)
File "/usr/lib/python3.8/site-packages/vit-2.0.0-py3.8.egg/vit/formatter/uda_string.py", line 7, in format
return (len(string), self.markup_element(string))
TypeError: object of type 'int' has no len()
The fault is pretty much the line that defines priority's type as numeric. If you comment it out or you rename the field, the problem is fixed.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels