Closed funkeyfreak closed 3 months ago
happy to help @funkeyfreak it trips while evaluating section names a couple of questions:
This error occurred when the workflow was first run. So far, none of the tasks are functional. And yes, I am using sections. They do not contain special characters. However, several projects contain brackets, parentheses, asterisks, and other symbols.
Thank you for your assistance.
@funkeyfreak yes, Todoist is now allowing special characters in the project names and I need to change the way they are handled. I will ping you when a new version is available
@funkeyfreak version 0.4 now supports spaces and most special characters in label and project names, except:
/
in projects (reserved for sections)
let me know if you see any issues! Thank you @giovannicoppola! The selected functions as indicated below are working:
When typing the name of a new task, the following excption is thrown for each character entered. In this case, the execption was thrown after the character 't' was entered.
[11:03:59.930] AlfreDo[Script Filter] Queuing argument 't'
[11:04:00.108] AlfreDo[Script Filter] Script with argv 't' finished
[11:04:00.114] ERROR: AlfreDo[Script Filter] Code 1: Traceback (most recent call last):
File "/Users/<redacted>/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.<redacted>/alfredo_ops.py", line 1147, in <module>
main ()
File "/Users/dalinwilliams/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.<redacted>/alfredo_ops.py", line 1143, in main
parseNewTask (MY_INPUT)
File "/Users/dalinwilliams/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.<redacted>/alfredo_ops.py", line 404, in parseNewTask
section_counts,mySectionListAll, section_ParentProjects = fetchSections(allTasks,mySections,myProjects)
File "/Users/dalinwilliams/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.<redacted>/alfredo_ops.py", line 165, in fetchSections
sectN = [x['name'] for x in mySections if x['id'] == item['section_id']][0]
IndexError: list index out of range
The following exception is thrown upon the selection of the "Get all Todoist tasks" menu option as illustrated below.
[11:10:20.087] AlfreDo[Script Filter] Queuing argument '(null)'
[11:10:20.264] AlfreDo[Script Filter] Script with argv '(null)' finished
[11:10:20.269] ERROR: AlfreDo[Script Filter] Code 1: 0 days from last update
Traceback (most recent call last):
File "/Users/<redacted>/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.<redacted>/alfredo-query.py", line 515, in <module>
main ()
File "/Users/dalinwilliams/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.<redacted>/alfredo-query.py", line 102, in main
project_counts,myProjectListAll = fetchProjects(toShow,myProjects,mySections)
File "/Users/dalinwilliams/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.<redacted>/alfredo_ops.py", line 195, in fetchProjects
sectN = [x['name'] for x in mySections if x['id'] == item['section_id']][0]
IndexError: list index out of range
yes, I think you have either a project, section, or label name with some special characters the workflow can't handle. Because it works with overdue tasks, I assume the offending projects/labels are associated with tasks with future due dates. if you are able to share the project names etc I can try to troubleshoot.
Also, when creating a new task, does it fail right after entering the keyword (default: !!!
) or when you are trying to enter a project (e.g. after #
), or a label (e.g. after @
)? This can also help to figure out what is going on.
Thank you for creating this very useful workflow. I have run into a slight complication. When querying for tasks due today, I see the following exception:
Would you have any insight as to the cause of this exception?