Jump to content

Homebrew and Cask for Alfred


Recommended Posts

  • 3 months later...

Hi! I've got error, I think the problem in path with name in cyrillic symbols.

>/Users/pavel/Dropbox/Приложения/

 

there are a debug messages from homebrew-for-alfred.alfredworkflow:

 

 

Starting debug for 'Homebrew for Alfred'

[ERROR: alfred.workflow.input.scriptfilter] Code 1: Traceback (most recent call last):

  File "brew.py", line 148, in <module>

    wf = Workflow()

  File "/Users/pavel/Dropbox/Приложения/Alfred/Alfred.alfredpreferences/workflows/user.workflow.08964E06-AFFB-45F2-AA38-CFEC96D9534C/workflow/workflow.py", line 825, in __init__

    self._info_plist = self.workflowfile('info.plist')

  File "/Users/pavel/Dropbox/Приложения/Alfred/Alfred.alfredpreferences/workflows/user.workflow.08964E06-AFFB-45F2-AA38-CFEC96D9534C/workflow/workflow.py", line 1125, in workflowfile

    return os.path.join(self.workflowdir, filename)

  File "/Users/pavel/Dropbox/Приложения/Alfred/Alfred.alfredpreferences/workflows/user.workflow.08964E06-AFFB-45F2-AA38-CFEC96D9534C/workflow/workflow.py", line 1081, in workflowdir

    if os.path.exists(os.path.join(dirpath, 'info.plist')):

  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/posixpath.py", line 80, in join

    path += '/' + b

UnicodeDecodeError: 'ascii' codec can't decode byte 0xd0 in position 21: ordinal not in range(128)

Edited by facetheheat
Link to comment
  • 1 month later...
  • 1 month later...
There appears to be a file missing. I get this error when running the cask command:

 


[ERROR: alfred.workflow.input.scriptfilter] Code 1: Traceback (most recent call last):
  File "cask.py", line 10, in <module>
import cask_refresh
  File "/Users/smargheim/Dropbox/Alfred.alfredpreferences/workflows/user.workflow.A69C6FCF-7BC0-402E-8931-A7344624C51C/cask_refresh.py", line 5, in <module>
from cask_helpers import execute_cask_command
ImportError: No module named cask_helpers

Link to comment
Unfortunately I'm still having trouble with the cask filter (using version 2.2 from GitHub). When I type cask, I get all the options, but if I select any of the options, Alfred immediately kicks to the default search (this happens with any options, i.e. cask search, cask install, cask list, etc). 

 

Here is the log for two attempts:



[ERROR: alfred.workflow.input.scriptfilter] Code 0: 20:59:16 workflow.py:2053 DEBUG    Update check not due
20:59:16 workflow.py:1544 DEBUG    Loading cached data from : /Users/smargheim/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.fniephaus.homebrew/__workflow_update_status.cpickle
20:59:16 background.py:180 DEBUG    Command arguments cached to [font=courier new,courier,monospace]/Users/smargheim/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.fniephaus.homebrew/cask_refresh.argcache[/font]
20:59:16 background.py:184 DEBUG    Calling [u'/usr/bin/python', '/Users/smargheim/Dropbox/Alfred.alfredpreferences/workflows/user.workflow.A69C6FCF-7BC0-402E-8931-A7344624C51C/workflow/background.pyc', 'cask_refresh'] ...
20:59:16 workflow.py:1907 DEBUG    Workflow finished in 0.002 seconds.
20:59:16 workflow.py:1907 DEBUG    Workflow finished in 0.004 seconds.
20:59:16 background.py:189 DEBUG    Executing task [font=courier new,courier,monospace]cask_refresh[/font] in background...
[ERROR: alfred.workflow.input.scriptfilter] Code 0: 20:59:39 workflow.py:2053 DEBUG    Update check not due
20:59:39 workflow.py:1544 DEBUG    Loading cached data from : /Users/smargheim/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.fniephaus.homebrew/__workflow_update_status.cpickle
20:59:39 workflow.py:1544 DEBUG    Loading cached data from : /Users/smargheim/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.fniephaus.homebrew/cask_installed.cpickle
20:59:39 background.py:180 DEBUG    Command arguments cached to [font=courier new,courier,monospace]/Users/smargheim/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.fniephaus.homebrew/cask_refresh.argcache[/font]
20:59:39 background.py:184 DEBUG    Calling [u'/usr/bin/python', '/Users/smargheim/Dropbox/Alfred.alfredpreferences/workflows/user.workflow.A69C6FCF-7BC0-402E-8931-A7344624C51C/workflow/background.pyc', 'cask_refresh'] ...
20:59:39 workflow.py:1907 DEBUG    Workflow finished in 0.002 seconds.
20:59:39 workflow.py:1907 DEBUG    Workflow finished in 0.004 seconds.
20:59:39 background.py:189 DEBUG    Executing task [font=courier new,courier,monospace]cask_refresh[/font] in background...

Edited by smarg19
Link to comment

 

Unfortunately I'm still having trouble with the cask filter (using version 2.2 from GitHub). When I type cask, I get all the options, but if I select any of the options, Alfred immediately kicks to the default search (this happens with any options, i.e. cask search, cask install, cask list, etc). 

 

 

Hi smarg19,

 

that's pretty weird and I can't reproduce the problem.

You're supposed to be able to see all casks available when using search, home and install.

And you should only see all installed casks when using list and uninstall.

Edited by fniephaus
Link to comment

Hi smarg19,

 

that's pretty weird and I can't reproduce the problem.

You're supposed to be able to see all casks available when using search, home and install.

And you should only see all installed casks when using list and uninstall.

Woops. I recently reset my Air and `cask` isn't installed yet. So that's on me, tho having a check for installation up front would probably provide better debugging.

Link to comment

:D

 

True, though. Always a good idea to check the program you need is installed if it isn't standard. Something like this always happens.

 

I remember spending two hours trying to figure out why my iBook wouldn't recognise my new printer when it had already worked perfectly. Finally I remembered I'd installed the drivers on a friend's identical iBook, not my own…

Link to comment

Yeah, one of the downsides to fiddling with my computer so much is that I often loose track of what I've changed and how. That's one of the reasons I like to package things in Alfred workflows. It's all synced thru Dropbox and I know to go to one place for functionality. 

Link to comment

Hey guys,

I'm really sorry about that! And it really is bad practice!

I should've thought about this when I decided to make the workflow public.

 

Version 2.4 now checks if brew & cask are installed and should resolve issues with brew uninstall/list as mentioned by ired:

https://github.com/fniephaus/alfred-homebrew/releases/tag/v2.4

 

Hey, you mean to tell me the workflow doesn't support automatic updates after all that time we spent on it???

Link to comment
  • 2 years later...

This has stopped working for me recently, after working just fine for a long time. The debugger doesn't really produce much, but Alfred 3 stops responding when I try e.g. Cask Install Firefox.

 

Edit: I updated this workflow recently, which may be the reason for the problems.

Edited by TheDonk
extra info
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...