Jump to content

Recommended Posts

Hi, I have two questions about multiple accounts.

 

I copied the workflow and only changed the keyword, then I run python gmail.py. However, it didn't ask me for the verification code this time. I can only use the second copy log into my first gmail account. Could you tell me how to solve it?

 

Another question is my own problem but I don't how to do. Gmail web page isn't launched in my default browser(Chrome),  but in a new tab of my iterm. Actually, all url links(e.g. webpage URLs in pdf) are now open in my terminal rather than my browser.

 

Thanks a lot

Share this post


Link to post

Hi, I have two questions about multiple accounts.

 

I copied the workflow and only changed the keyword, then I run python gmail.py. However, it didn't ask me for the verification code this time. I can only use the second copy log into my first gmail account. Could you tell me how to solve it?

 

Another question is my own problem but I don't how to do. Gmail web page isn't launched in my default browser(Chrome),  but in a new tab of my iterm. Actually, all url links(e.g. webpage URLs in pdf) are now open in my terminal rather than my browser.

 

Thanks a lot

 

When you duplicate the workflow, make sure you change the Bundle ID to something other than com.fniephaus.gmail. That should solve your first problem.

 

Re your 2nd question: looks like your LaunchServices are misconfigured. Maybe google the problem or you might want to try a tool like this: http://www.rubicode.com/Software/RCDefaultApp/ (haven't used it myself)

 

Hope this helps!

Share this post


Link to post

I keep getting 

Error in workflow '[blahblahblah]/Alfred.alfredpreferences'

and then the subtext says

'threads'

Any ideas?

 

What have you typed into Alfred? Line numbers?

Share this post


Link to post

Fniephaus, are you going to realease a new builds? :)

It would be great if you are:)

 

I've been waiting for alfred-workflow to fix some bugs. I'll update this workflow in the next week!

Share this post


Link to post

What have you typed into Alfred? Line numbers?

 

I'm not the one who posted this, but I got the same issue. 

 

I guess it only happens when the cache is empty and the Inbox is empty, too.

 

Added 

    if(threads['resultSizeEstimate']==0):
	   return [];
before line 61 in gmail_refresh.py.
fixed it for me.

 

 

Greetings Badagent

Edited by badagent

Share this post


Link to post

Hi I am looking forward to use this workflow looks great!!

 

But I got this message when I tried to use the workflow:

 

[ERROR: alfred.workflow.input.scriptfilter] Code 1: 01:04:16 workflow.py:1429 DEBUG    Loading cached data from : /Users/wandersonferreira/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.fniephaus.gmail/gmail_list.cpickle

01:04:16 workflow.py:1764 ERROR    'NoneType' object has no attribute '__getitem__'

Traceback (most recent call last):

  File "/Users/wandersonferreira/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.652750E0-221B-47E0-8BD1-00C0CFA153C4/workflow/workflow.py", line 1762, in run

    func(self)

  File "gmail.py", line 31, in main

    subtitle = '%s - %s' % (item['Date'][:-6], item['snippet'])

TypeError: 'NoneType' object has no attribute '__getitem__'

 

 

Thanks for help!

Best

Share this post


Link to post

 

how do I install ?

thank you

----------------------

comment l'installe t-on ?
Merci

 

 

Simply install the workflow, uncheck both Gmail entries in Alfred Preferences > Features > Web Search and then run the workflow using the 'gmail' keyword.

 

Hope this helps

Share this post


Link to post

Is there any plan to make this workflow async? 

Now it takes time after actions like archivation for alfred to appear again. 

It would be magic if all requests were made in background. 

Share this post


Link to post

Is there any plan to make this workflow async? 

Now it takes time after actions like archivation for alfred to appear again. 

It would be magic if all requests were made in background. 

 

That's definitely something that could be improved.

I haven't really thought about it yet...and some things like notifications require the user to press enter.

 

I've opened an issue on GitHub: https://github.com/fniephaus/alfred-gmail/issues/12

 

Feel free to comment on that or even open more issue with more ideas!

Share this post


Link to post

Hello, 

For some weird reason, I cannot get emails from my inbox, but I get starred or unread emails. Any ideas?

 

 

[sTDERR: alfred.workflow.input.scriptfilter] 10:17:12 workflow.py:2053 DEBUG    Update check not due

10:17:12 workflow.py:1544 DEBUG    Loading cached data from : /Users/sdaza/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.fniephaus.gmail/__workflow_update_status.cpickle

10:17:12 background.py:180 DEBUG    Command arguments cached to `/Users/sdaza/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.fniephaus.gmail/gmail_refresh.argcache`

10:17:12 background.py:184 DEBUG    Calling [u'/usr/bin/python', '/Users/sdaza/Dropbox/Alfred/Alfred.alfredpreferences/workflows/user.workflow.CCF8141A-7734-4398-AA6C-A541DF2E19BE/workflow/background.pyc', 'gmail_refresh'] ...

10:17:12 workflow.py:1907 DEBUG    Workflow finished in 0.002 seconds.

10:17:12 workflow.py:1907 DEBUG    Workflow finished in 0.003 seconds.

10:17:12 background.py:189 DEBUG    Executing task `gmail_refresh` in background...

[sTDERR: alfred.workflow.input.scriptfilter] 10:17:14 workflow.py:2053 DEBUG    Update check not due

10:17:14 workflow.py:1544 DEBUG    Loading cached data from : /Users/sdaza/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.fniephaus.gmail/__workflow_update_status.cpickle

[sTDERR: alfred.workflow.input.scriptfilter] 10:17:14 workflow.py:2053 DEBUG    Update check not due

10:17:14 workflow.py:1544 DEBUG    Loading cached data from : /Users/sdaza/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.fniephaus.gmail/__workflow_update_status.cpickle

[ERROR: alfred.workflow.input.scriptfilter] Code 1: 10:17:15 workflow.py:2053 DEBUG    Update check not due

10:17:15 workflow.py:1544 DEBUG    Loading cached data from : /Users/sdaza/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.fniephaus.gmail/__workflow_update_status.cpickle

10:17:15 workflow.py:2154 DEBUG    Got password : com.fniephaus.gmail:gmail_credentials

Traceback (most recent call last):

  File "gmail.py", line 254, in <module>

    main()

  File "gmail.py", line 126, in main

    refresh_cache([label])

  File "/Users/sdaza/Dropbox/Alfred/Alfred.alfredpreferences/workflows/user.workflow.CCF8141A-7734-4398-AA6C-A541DF2E19BE/gmail_refresh.py", line 128, in refresh_cache

    label.lower(), get_list(http, gmail_service, label))

  File "/Users/sdaza/Dropbox/Alfred/Alfred.alfredpreferences/workflows/user.workflow.CCF8141A-7734-4398-AA6C-A541DF2E19BE/gmail_refresh.py", line 95, in get_list

    batch.execute(http=http)

  File "/Users/sdaza/Dropbox/Alfred/Alfred.alfredpreferences/workflows/user.workflow.CCF8141A-7734-4398-AA6C-A541DF2E19BE/oauth2client/util.py", line 132, in positional_wrapper

    return wrapped(*args, **kwargs)

  File "/Users/sdaza/Dropbox/Alfred/Alfred.alfredpreferences/workflows/user.workflow.CCF8141A-7734-4398-AA6C-A541DF2E19BE/apiclient/http.py", line 1330, in execute

    callback(request_id, response, exception)

  File "/Users/sdaza/Dropbox/Alfred/Alfred.alfredpreferences/workflows/user.workflow.CCF8141A-7734-4398-AA6C-A541DF2E19BE/gmail_refresh.py", line 89, in wrapper

    list_threads(label, request_id, response, exception)

  File "/Users/sdaza/Dropbox/Alfred/Alfred.alfredpreferences/workflows/user.workflow.CCF8141A-7734-4398-AA6C-A541DF2E19BE/gmail_refresh.py", line 59, in list_threads

    'value'])

  File "/Users/sdaza/Dropbox/Alfred/Alfred.alfredpreferences/workflows/user.workflow.CCF8141A-7734-4398-AA6C-A541DF2E19BE/gmail_refresh.py", line 72, in get_date

    return strftime("%m/%d/%Y %H:%M", parsedate(date_str))

TypeError: argument must be 9-item sequence, not None

Share this post


Link to post

Hello, 

For some weird reason, I cannot get emails from my inbox, but I get starred or unread emails. Any ideas?

 

Hi Sebastian,

Thanks for the bug report.

Could you please delete the `com.fniephaus.gmail` entry from your keychain and then try again?

Share this post


Link to post

This workflow seems amazing. But I can't get it going. No matter which mailbox I choose (INBOX, STARRED, SENT, SPAM, ETC) I get "No Mails Found". Can you help?

 

Starting debug for 'Gmail Client for Alfred'

 

[sTDERR: alfred.workflow.input.scriptfilter] 16:28:08 workflow.py:2053 DEBUG    Update check not due

16:28:08 workflow.py:1544 DEBUG    Loading cached data from : /Users/Wass/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.fniephaus.gmail/__workflow_update_status.cpickle

16:28:08 background.py:180 DEBUG    Command arguments cached to `/Users/Wass/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.fniephaus.gmail/gmail_refresh.argcache`

16:28:08 background.py:184 DEBUG    Calling [u'/usr/bin/python', '/Users/Wass/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.0CC619D6-D3A8-4F00-B4BF-A674D6704977/workflow/background.pyc', 'gmail_refresh'] ...

16:28:08 workflow.py:1907 DEBUG    Workflow finished in 0.001 seconds.

16:28:08 workflow.py:1907 DEBUG    Workflow finished in 0.002 seconds.

16:28:08 background.py:189 DEBUG    Executing task `gmail_refresh` in background...

[sTDERR: alfred.workflow.input.scriptfilter] 16:28:18 workflow.py:2053 DEBUG    Update check not due

16:28:18 workflow.py:1544 DEBUG    Loading cached data from : /Users/Wass/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.fniephaus.gmail/__workflow_update_status.cpickle

16:28:18 workflow.py:1544 DEBUG    Loading cached data from : /Users/Wass/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.fniephaus.gmail/gmail_inbox.cpickle

[ERROR: alfred.workflow.action.script] 16:28:21 workflow.py:1907 DEBUG    Workflow finished in 0.103 seconds.

[sTDERR: alfred.workflow.input.scriptfilter] 16:28:21 workflow.py:2053 DEBUG    Update check not due

16:28:21 workflow.py:1544 DEBUG    Loading cached data from : /Users/Wass/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.fniephaus.gmail/__workflow_update_status.cpickle

[sTDERR: alfred.workflow.input.scriptfilter] 16:28:23 workflow.py:2053 DEBUG    Update check not due

16:28:23 workflow.py:1544 DEBUG    Loading cached data from : /Users/Wass/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.fniephaus.gmail/__workflow_update_status.cpickle

16:28:23 workflow.py:1544 DEBUG    Loading cached data from : /Users/Wass/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.fniephaus.gmail/gmail_starred.cpickle

Share this post


Link to post

This workflow seems amazing. But I can't get it going. No matter which mailbox I choose (INBOX, STARRED, SENT, SPAM, ETC) I get "No Mails Found". Can you help?

 

Hi Eric,

Thanks for getting in touch.

Could you also please delete the `com.fniephaus.gmail` entry from your keychain and then try again?

Unfortunately, I can't really tell from your log what's causing your issue.

What workflow, Alfred version and operating system are you using?

 

Fabio

Share this post


Link to post

Hi Eric,

Thanks for getting in touch.

Could you also please delete the `com.fniephaus.gmail` entry from your keychain and then try again?

Unfortunately, I can't really tell from your log what's causing your issue.

What workflow, Alfred version and operating system are you using?

 

Fabio

I tried deleting the keychain entry and that did force me to re-log into gmail. Unfortunately, though, it didn't solve the problem and the same keychain entry is back.

Alfred v 2.6 (374)

OS X 10.10.2

Gmail for Alfred 1.1

 

Thank you!

Share this post


Link to post

I tried deleting the keychain entry and that did force me to re-log into gmail. Unfortunately, though, it didn't solve the problem and the same keychain entry is back.

Alfred v 2.6 (374)

OS X 10.10.2

Gmail for Alfred 1.1

 

Thank you!

 

Thanks, Eric. I think I was able to track down the problem!

Here's a new version that should fix it:

https://github.com/fniephaus/alfred-gmail/releases/tag/v1.2

 

Same problem here... it creates the same keychain `com.fniephaus.gmail` , over and over. 

Thanks!

 

The workflow saves the access token in your keychain, so the file is supposed to be created if it does not exist. Deleting the file will force you to re-authenticate. In v1.2 I've now added a shortcut (`wf:deauth`) for doing this.

Edited by fniephaus

Share this post


Link to post

After some initial CACHE errors it now seems to be working beautifully. Thanks for making this. Excellent job!

 

Thanks, Eric. I think I was able to track down the problem!

Here's a new version that should fix it:

https://github.com/fniephaus/alfred-gmail/releases/tag/v1.2

 

 

The workflow saves the access token in your keychain, so the file is supposed to be created if it does not exist. Deleting the file will force you to re-authenticate. In v1.2 I've now added a shortcut (`wf:deauth`) for doing this.

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...