Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR: could not find workflow directory #8

Closed
noisufnoc opened this issue Dec 4, 2017 · 12 comments
Closed

ERROR: could not find workflow directory #8

noisufnoc opened this issue Dec 4, 2017 · 12 comments

Comments

@noisufnoc
Copy link

Is there another configuration step to tell fixum where my workflow directory is?

@deanishe
Copy link
Owner

deanishe commented Dec 4, 2017

No. And I can't really help with no information but the error message.

Which version of Alfred are you using?

Where are your workflows (i.e. do you sync them)?

@noisufnoc
Copy link
Author

noisufnoc commented Dec 4, 2017

Hi. I'm running Alfred 3.5.1, here is the fixum.log

11:56:46 fixum.py:265 INFO     ==================================================
11:56:46 fixum.py:267 INFO     looking for workflows using an outdated (buggy) version of Alfred-Workflow...
11:56:46 fixum.py:274 CRITICAL could not find your workflow directory

It appears to be complaining about the version of Alfred-Workflow, is that an aspect of alfred-fixum or another dependency I need to fix?

@noisufnoc
Copy link
Author

I'm running v0.7 of Fixum.

@deanishe
Copy link
Owner

deanishe commented Dec 4, 2017

It appears to be complaining about the version of Alfred-Workflow

It's not. It's complaining about not being able to find your workflows.

Where are they? Do you sync them?

@noisufnoc
Copy link
Author

/Users/noisufnoc/Library/Application\ Support/Alfred\ 3/Alfred.alfredpreferences/workflows

I do not sync them.

@deanishe
Copy link
Owner

deanishe commented Dec 4, 2017

Could you open up the workflow (Alfred Preferences > Right click > Open in Finder) and edit fixum.py.

Uncomment line 154 (log.debug(...)), then run Fixum again with Alfred's debugger open.

See which path it prints.

@noisufnoc
Copy link
Author

Starting debug for 'Fixum'

[2017-12-04 14:53:34][input.scriptfilter] Queuing argument ''
[2017-12-04 14:53:34][input.scriptfilter] Script with argument '' finished
[2017-12-04 14:53:34][STDERR: input.scriptfilter] 14:53:34 workflow.py:2247 DEBUG    ---------- Fixum (0.7.0) ----------
14:53:34 workflow.py:1657 DEBUG    reading settings from /Users/noisufnoc/Library/Application Support/Alfred 3/Workflow Data/net.deanishe.alfred.fixum/settings.json
14:53:34 workflow.py:2531 DEBUG    update check not due
14:53:34 fixum.py:211 DEBUG    query=u''
14:53:34 workflow.py:1884 DEBUG    loading cached data: /Users/noisufnoc/Library/Caches/com.runningwithcrayons.Alfred-3/Workflow Data/net.deanishe.alfred.fixum/__workflow_update_status.cpickle
14:53:34 workflow.py:2461 DEBUG    update_data: {u'available': False}
14:53:34 workflow.py:2440 DEBUG    set last run version: 0.7.0
14:53:34 workflow.py:2289 DEBUG    ---------- finished in 0.004s ----------
[2017-12-04 14:53:34][input.scriptfilter] {"items": [{"arg": "dryrun", "valid": true, "subtitle": "Show what the workflow would update", "uid": "dryrun", "title": "Dry Run"}, {"arg": "log", "valid": true, "subtitle": "Open the log file in Console.app", "uid": "log", "title": "View Log File"}, {"arg": "blacklist", "valid": true, "subtitle": "List of workflows to *not* update", "uid": "blacklist", "title": "Edit Blacklist"}, {"arg": "fix", "valid": true, "subtitle": "Replace broken versions of Alfred-Workflow within your workflows", "uid": "fix", "title": "Fix Workflows"}]}
[2017-12-04 14:53:40][input.scriptfilter] Processing output of 'action.script' with arg 'dryrun'
[2017-12-04 14:53:40][ERROR: action.script] 14:53:40 workflow.py:2247 DEBUG    ---------- Fixum (0.7.0) ----------
14:53:40 workflow.py:1657 DEBUG    reading settings from /Users/noisufnoc/Library/Application Support/Alfred 3/Workflow Data/net.deanishe.alfred.fixum/settings.json
14:53:40 workflow.py:2531 DEBUG    update check not due
14:53:40 fixum.py:265 INFO     ==================================================
14:53:40 fixum.py:266 DEBUG    opts={'--help': False,
 '--nothing': True,
 '--version': False,
 '<query>': None,
 'list': False}
14:53:40 fixum.py:267 INFO     looking for workflows using an outdated (buggy) version of Alfred-Workflow...
14:53:40 fixum.py:154 DEBUG    Workflow sync dir : '/Users/noisufnoc/personal/alfred/Alfred.alfredpreferences/workflows'
14:53:40 fixum.py:160 DEBUG    Alfred.alfredpreferences/workflows not found
14:53:40 fixum.py:274 CRITICAL could not find your workflow directory
14:53:40 workflow.py:2440 DEBUG    set last run version: 0.7.0
14:53:40 workflow.py:2289 DEBUG    ---------- finished in 0.032s ----------
[2017-12-04 14:53:40][action.script] Processing output of 'output.notification' with arg 'ERROR: could not find workflow directory

So how do I point the it to the proper directory?

@deanishe
Copy link
Owner

deanishe commented Dec 4, 2017

A few possibilities.

  1. You could set your sync folder to ~/Library/Application Support/Alfred 3 in Alfred Preferences > Advanced.
  2. You could quit Alfred and edit ~/Library/Preferences/com.runningwithcrayons.Alfred-Preferences-3.plist by hand to remove the syncfolder key and value.
  3. You could edit line 153 of fixum.py to read syncdir = '~/Library/Application Support/Alfred 3'

1 or 2 would be better until I talk to Andrew and figure out why you have syncdir set.

What do you see in Alfred Preferences > Advanced next to "Syncing:"?

Does the ~/personal/alfred directory exist on your system?

@noisufnoc
Copy link
Author

You could quit Alfred and edit ~/Library/Preferences/com.runningwithcrayons.Alfred-Preferences-3.plist by hand to remove the syncfolder key and value.

That's what I did and now fixum is working as expected. Alfred Preferences > Advanced said "Not Synced", perhaps there was a legacy Alfred 2 setting that was mucking things up. Either way, removing the old ~/personal/alfred (which existed back when I used Alfred 2) from the plist file did the trick.

Thanks!

@deanishe
Copy link
Owner

deanishe commented Dec 4, 2017

Awesome!

So ~/personal/alfred doesn't exist any more?

I ask, as I need to fix the workflow for anyone with the same issue.

From my tests, Alfred recreates an empty Alfred.alfredpreferences bundle if syncfolder is set, but it seems from what you say that rather than creating the directory, it silently goes back to the default location under ~/Library if syncfolder doesn't exist.

@noisufnoc
Copy link
Author

Correct. ~/personal/alfred no longer exists. Happy to help if there's any other output you'd like!

deanishe added a commit that referenced this issue Dec 4, 2017
@deanishe
Copy link
Owner

deanishe commented Dec 4, 2017

Nope, that's grand, thanks.

Version 0.8 appears to handle your situation perfectly.

Alfred's behaviour is a bit questionable in this regard, so I'll report a bug.

Thanks very much for finding, and most importantly, helping fix the bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants