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

Great workflow - but I can't set a citation style for some reason? #22

Closed
alistairwilson opened this issue Jun 5, 2019 · 6 comments
Closed

Comments

@alistairwilson
Copy link

Love the workflow, thank you. Hi - I'm not much of a coder and am trying to work out why when I type 'zotconf' to select default cite style, I see the list of styles in use in Zotero - but it won't save when I key down to my desired style and hit enter ?

@deanishe
Copy link
Owner

deanishe commented Jun 5, 2019

What does Alfred's debugger show? Which version of Alfred are you using?

@alistairwilson
Copy link
Author

Using Alfred 4.... too soon?

@alistairwilson
Copy link
Author

debug info:

[23:50:45.561] Logging Started...
[23:50:53.203] STDERR: ZotHero[Script Filter] .
23:50:53 workflow.py:2055 DEBUG ---------- ZotHero (1.2.0) ----------
23:50:53 workflow.py:1462 DEBUG reading settings from /Users/aw/Library/Application Support/Alfred/Workflow Data/net.deanishe.alfred.zothero/settings.json
23:50:53 workflow.py:2339 DEBUG update check not due
23:50:53 zh:625 DEBUG args={'--bibliography': False,
'--help': False,
'--paste': False,
'--style': None,
'--text': None,
'--title': None,
'': None,
'': None,
'': u'',
'<style>': None,
'': None,
'attachments': False,
'citations': False,
'clear': False,
'config': True,
'copy': False,
'fields': False,
'locale': False,
'notify': False,
'reindex': False,
'search': False,
'setvar': False,
'style': False}
23:50:53 config.py:85 DEBUG [config] datadir=u'/Users/aw/Zotero'
23:50:53 core.py:72 DEBUG [core] cachedir=u'/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/net.deanishe.alfred.zothero'
23:50:53 core.py:73 DEBUG [core] zotero_dir=u'
/Zotero'
23:50:53 core.py:74 DEBUG [core] attachments_dir=None
23:50:53 workflow.py:1689 DEBUG loading cached data: /Users/aw/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/net.deanishe.alfred.zothero/__workflow_update_status.cpickle
23:50:53 workflow.py:2269 DEBUG update_data: {u'available': False}
23:50:53 workflow.py:2248 DEBUG set last run version: 1.2.0
23:50:53 workflow.py:2097 DEBUG ---------- finished in 0.067s ----------
[23:50:55.356] ZotHero[Debug] .
/----------- CONF OUT -----------
query=
variables={
action = "choose-style"
ATTACHMENTS_DIR = ""
CITE_STYLE = ""
LOCALE = "en-GB"
style = ""
varname = "CITE_STYLE"
ZOTERO_DIR = ""
}
--------------------------------/
[23:50:55.732] STDERR: ZotHero[Script Filter] .
23:50:55 workflow.py:2055 DEBUG ---------- ZotHero (1.2.0) ----------
23:50:55 workflow.py:1462 DEBUG reading settings from /Users/aw/Library/Application Support/Alfred/Workflow Data/net.deanishe.alfred.zothero/settings.json
23:50:55 workflow.py:2339 DEBUG update check not due
23:50:55 zh:625 DEBUG args={'--bibliography': False,
'--help': False,
'--paste': False,
'--style': None,
'--text': None,
'--title': None,
'': None,
'': None,
'': u'',
'<style>': None,
'': None,
'attachments': False,
'citations': False,
'clear': False,
'config': False,
'copy': False,
'fields': False,
'locale': False,
'notify': False,
'reindex': False,
'search': False,
'setvar': False,
'style': True}
23:50:55 config.py:85 DEBUG [config] datadir=u'/Users/aw/Zotero'
23:50:55 core.py:72 DEBUG [core] cachedir=u'/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/net.deanishe.alfred.zothero'
23:50:55 core.py:73 DEBUG [core] zotero_dir=u'
/Zotero'
23:50:55 core.py:74 DEBUG [core] attachments_dir=None
23:50:55 util.py:143 DEBUG [util] copying u'/Zotero/zotero.sqlite' to u'/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/net.deanishe.alfred.zothero/zotero.sqlite' ...
23:50:55 core.py:133 DEBUG [core] storage=u'/Zotero/storage'
23:50:55 core.py:134 DEBUG [core] styles=u'
/Zotero/styles'
23:50:55 cache.py:311 DEBUG [cache] opening store 'styles'...
23:50:55 cache.py:311 DEBUG [cache] opening store 'modtimes'...
23:50:55 cache.py:165 DEBUG [modtimes] updated /Users/aw/Zotero/styles/liverpool-john-moores-university-harvard.csl -> '1559749952.0834687'
23:50:55 styles.py:309 DEBUG [styles] reading "/Zotero/styles/liverpool-john-moores-university-harvard.csl" ...
23:50:55 cache.py:165 DEBUG [styles] updated http://www.zotero.org/styles/liverpool-john-moores-university-harvard -> '{"parent_url": null, "path": "/Users/aw/Zotero/styles/liverpool-john-moores-university-harvard.csl", "hidden": false, "url": "http://www.zotero.org/styles/liverpool-john-moores-university-harvard", "name": "Liverpool John Moores University - Harvard"}'
23:50:55 styles.py:322 INFO [styles] loaded [http://www.zotero.org/styles/liverpool-john-moores-university-harvard] Liverpool John Moores University - Harvard
23:50:55 cache.py:178 DEBUG [modtimes] inserted /Users/aw/Zotero/styles/apa.csl -> '1559750879.4828537'
23:50:55 styles.py:309 DEBUG [styles] reading "
/Zotero/styles/apa.csl" ...
23:50:55 cache.py:178 DEBUG [styles] inserted http://www.zotero.org/styles/apa -> '{"parent_url": null, "path": "/Users/aw/Zotero/styles/apa.csl", "hidden": false, "url": "http://www.zotero.org/styles/apa", "name": "American Psychological Association 6th edition"}'
23:50:55 styles.py:322 INFO [styles] loaded [http://www.zotero.org/styles/apa] American Psychological Association 6th edition
23:50:55 workflow.py:2248 DEBUG set last run version: 1.2.0
23:50:55 workflow.py:2097 DEBUG ---------- finished in 0.185s ----------
[23:50:59.225] ZotHero[Debug] .
/----------- SETVAR IN -----------
query=
variables={
action = "choose-style"
ATTACHMENTS_DIR = ""
CITE_STYLE = ""
LOCALE = "en-GB"
next = "config"
style = ""
varname = "CITE_STYLE"
varval = "http://www.zotero.org/styles/de-montfort-university-harvard"
ZOTERO_DIR = ""
}
---------------------------------/
[23:50:59.566] STDERR: ZotHero[Run Script] .
23:50:59 workflow.py:2055 DEBUG ---------- ZotHero (1.2.0) ----------
23:50:59 workflow.py:1462 DEBUG reading settings from /Users/aw/Library/Application Support/Alfred/Workflow Data/net.deanishe.alfred.zothero/settings.json
23:50:59 workflow.py:2339 DEBUG update check not due
23:50:59 zh:625 DEBUG args={'--bibliography': False,
'--help': False,
'--paste': False,
'--style': None,
'--text': None,
'--title': None,
'': None,
'': u'CITE_STYLE',
'': None,
'<style>': None,
'': u'http://www.zotero.org/styles/de-montfort-university-harvard',
'attachments': False,
'citations': False,
'clear': False,
'config': False,
'copy': False,
'fields': False,
'locale': False,
'notify': False,
'reindex': False,
'search': False,
'setvar': True,
'style': False}
23:50:59 config.py:85 DEBUG [config] datadir=u'/Users/aw/Zotero'
23:50:59 core.py:72 DEBUG [core] cachedir=u'/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/net.deanishe.alfred.zothero'
23:50:59 core.py:73 DEBUG [core] zotero_dir=u'
/Zotero'
23:50:59 core.py:74 DEBUG [core] attachments_dir=None
23:50:59 zh:587 DEBUG [settings] setting "CITE_STYLE" to "http://www.zotero.org/styles/de-montfort-university-harvard" ...
33:48: syntax error: A “"” can’t go after this identifier. (-2740)
23:50:59 workflow.py:2074 ERROR Command '['/usr/bin/osascript', '-l', 'AppleScript', '-e', '\ntell application "Alfred 3"\nset configuration "CITE_STYLE" to value "http://www.zotero.org/styles/de-montfort-university-harvard" in workflow "net.deanishe.alfred.zothero" exportable true\nend tell\n']' returned non-zero exit status 1
Traceback (most recent call last):
File "./lib/workflow/workflow.py", line 2067, in run
func(self)
File "./zh", line 678, in main
return do_setvar(args[''], args[''])
File "./zh", line 588, in do_setvar
set_config(key, value, exportable=True)
File "./lib/workflow/util.py", line 272, in set_config
run_applescript(script)
File "./lib/workflow/util.py", line 195, in run_applescript
return run_command(cmd)
File "./lib/workflow/util.py", line 165, in run_command
return subprocess.check_output(cmd, **kwargs)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 573, in check_output
raise CalledProcessError(retcode, cmd, output=output)
CalledProcessError: Command '['/usr/bin/osascript', '-l', 'AppleScript', '-e', '\ntell application "Alfred 3"\nset configuration "CITE_STYLE" to value "http://www.zotero.org/styles/de-montfort-university-harvard" in workflow "net.deanishe.alfred.zothero" exportable true\nend tell\n']' returned non-zero exit status 1
23:50:59 workflow.py:2076 INFO for assistance, see: https://github.com/deanishe/zothero/issues
23:50:59 workflow.py:2097 DEBUG ---------- finished in 0.194s ----------
[23:50:59.784] STDERR: ZotHero[Run Script] .
23:50:59 workflow.py:2055 DEBUG ---------- ZotHero (1.2.0) ----------
23:50:59 workflow.py:1462 DEBUG reading settings from /Users/aw/Library/Application Support/Alfred/Workflow Data/net.deanishe.alfred.zothero/settings.json
23:50:59 workflow.py:2339 DEBUG update check not due
23:50:59 zh:625 DEBUG args={'--bibliography': False,
'--help': False,
'--paste': False,
'--style': None,
'--text': None,
'--title': None,
'': None,
'': None,
'': None,
'<style>': None,
'': None,
'attachments': False,
'citations': False,
'clear': False,
'config': False,
'copy': False,
'fields': False,
'locale': False,
'notify': True,
'reindex': False,
'search': False,
'setvar': False,
'style': False}
23:50:59 config.py:85 DEBUG [config] datadir=u'/Users/aw/Zotero'
23:50:59 core.py:72 DEBUG [core] cachedir=u'/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/net.deanishe.alfred.zothero'
23:50:59 core.py:73 DEBUG [core] zotero_dir=u'
/Zotero'
23:50:59 core.py:74 DEBUG [core] attachments_dir=None
23:50:59 zh:604 DEBUG ignoring empty notification
23:50:59 workflow.py:2248 DEBUG set last run version: 1.2.0
23:50:59 workflow.py:2097 DEBUG ---------- finished in 0.049s ----------
[23:50:59.794] STDERR: ZotHero[Script Filter] .
23:50:59 workflow.py:2055 DEBUG ---------- ZotHero (1.2.0) ----------
23:50:59 workflow.py:1462 DEBUG reading settings from /Users/aw/Library/Application Support/Alfred/Workflow Data/net.deanishe.alfred.zothero/settings.json
23:50:59 workflow.py:2339 DEBUG update check not due
23:50:59 zh:625 DEBUG args={'--bibliography': False,
'--help': False,
'--paste': False,
'--style': None,
'--text': None,
'--title': None,
'': None,
'': None,
'': u'',
'<style>': None,
'': None,
'attachments': False,
'citations': False,
'clear': False,
'config': True,
'copy': False,
'fields': False,
'locale': False,
'notify': False,
'reindex': False,
'search': False,
'setvar': False,
'style': False}
23:50:59 config.py:85 DEBUG [config] datadir=u'/Users/aw/Zotero'
23:50:59 core.py:72 DEBUG [core] cachedir=u'/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/net.deanishe.alfred.zothero'
23:50:59 core.py:73 DEBUG [core] zotero_dir=u'
/Zotero'
23:50:59 core.py:74 DEBUG [core] attachments_dir=None
23:50:59 workflow.py:1689 DEBUG loading cached data: /Users/aw/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/net.deanishe.alfred.zothero/__workflow_update_status.cpickle
23:50:59 workflow.py:2269 DEBUG update_data: {u'available': False}
23:50:59 workflow.py:2248 DEBUG set last run version: 1.2.0
23:50:59 workflow.py:2097 DEBUG ---------- finished in 0.039s ----------

@cong314159
Copy link

Same here.

@deanishe
Copy link
Owner

deanishe commented Jun 8, 2019

Thanks for the log @alistairwilson. Yeah, it's an Alfred 4 thing. I need to update some dependencies and make a new release to fix it.

In the meantime, running the Fixum workflow will get ZotHero working under Alfred 4 (and possibly some of your other workflows, too).

@alistairwilson
Copy link
Author

Thank you by the way - working fine now :-)

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

3 participants