Jump to content

pandoctor not putting (but no error messages)


Recommended Posts

Hello

 

I've been using pandoctor alfred workflow to run the John McFarlane's pandoc. However, the other day it simply stopped working (without apparent cause). I don't get any error messages or evidence that something is wrong with the install. If I run pandoc 'manually' via the terminal it still works perfectly.

 

Any ideas? I've uninstalled and then reinstalled (and rerun the config) – but no luck.

 

Below is the dr:config just in case that's helpful.

 

Thanks in advance.

 

Simon

 

 

 

Starting debug for 'Pandoctor'
 
[ERROR: alfred.workflow.action.script] Code 0: 16:15:11 pandoctor.py:1206 DEBUG    {u'<argument>': None,
 u'<flag>': None,
 u'config': True,
 u'help': False,
 u'launch': False,
 u'run': False,
 u'search': False,
 u'store': False}
16:15:11 workflow.py:940 DEBUG    Loading cached data from : /Users/skellis/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.hackademic.pandoctor/runner.cache
16:15:11 workflow.py:940 DEBUG    Loading cached data from : /Users/skellis/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.hackademic.pandoctor/pandoc.cache
16:15:12 workflow.py:940 DEBUG    Loading cached data from : /Users/skellis/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.hackademic.pandoctor/pandoc.cache
16:15:12 workflow.py:970 DEBUG    Cached data saved at : /Users/skellis/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.hackademic.pandoctor/pandoc.cache
16:15:13 workflow.py:940 DEBUG    Loading cached data from : /Users/skellis/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.hackademic.pandoctor/pandoc.cache
16:15:13 workflow.py:970 DEBUG    Cached data saved at : /Users/skellis/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.hackademic.pandoctor/pandoc.cache
16:15:13 workflow.py:940 DEBUG    Loading cached data from : /Users/skellis/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.hackademic.pandoctor/pandoc.cache
16:15:13 workflow.py:970 DEBUG    Cached data saved at : /Users/skellis/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.hackademic.pandoctor/pandoc.cache
16:15:13 workflow.py:940 DEBUG    Loading cached data from : /Users/skellis/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.hackademic.pandoctor/pandoc.cache
16:15:13 workflow.py:970 DEBUG    Cached data saved at : /Users/skellis/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.hackademic.pandoctor/pandoc.cache

 

Link to comment

Thanks.

 

Here it is (with errors!).

 

 

Starting debug for 'Pandoctor'

 

[iNFO: alfred.workflow.trigger.action] Processing output 'alfred.workflow.action.script' with arg '(

    "/Users/skellis/Downloads/rose.md"

)'

[ERROR: alfred.workflow.action.script] Code 0: 16:26:07 pandoctor.py:1206 DEBUG    {u'<argument>': u'/Users/skellis/Downloads/rose.md',

 u'<flag>': u'in_path',

 u'config': False,

 u'help': False,

 u'launch': False,

 u'run': False,

 u'search': False,

 u'store': True}

16:26:07 workflow.py:940 DEBUG    Loading cached data from : /Users/skellis/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.hackademic.pandoctor/runner.cache

16:26:07 workflow.py:940 DEBUG    Loading cached data from : /Users/skellis/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.hackademic.pandoctor/pandoc.cache

16:26:07 workflow.py:970 DEBUG    Cached data saved at : /Users/skellis/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.hackademic.pandoctor/runner.cache

[iNFO: alfred.workflow.action.script] Processing output 'alfred.workflow.output.script' with arg ''

[ERROR: alfred.workflow.output.script] Code 0: 16:26:07 pandoctor.py:1206 DEBUG    {u'<argument>': u'[path]',

 u'<flag>': u'pandoc_inputs',

 u'config': False,

 u'help': False,

 u'launch': True,

 u'run': False,

 u'search': False,

 u'store': False}

16:26:07 workflow.py:940 DEBUG    Loading cached data from : /Users/skellis/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.hackademic.pandoctor/runner.cache

16:26:07 workflow.py:940 DEBUG    Loading cached data from : /Users/skellis/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.hackademic.pandoctor/pandoc.cache

[ERROR: alfred.workflow.input.scriptfilter] Code 0: 16:26:07 pandoctor.py:1206 DEBUG    {u'<argument>': u'markdown',

 u'<flag>': u'inputs',

 u'config': False,

 u'help': False,

 u'launch': False,

 u'run': False,

 u'search': True,

 u'store': False}

16:26:07 workflow.py:940 DEBUG    Loading cached data from : /Users/skellis/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.hackademic.pandoctor/runner.cache

16:26:07 workflow.py:940 DEBUG    Loading cached data from : /Users/skellis/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.hackademic.pandoctor/pandoc.cache

[iNFO: alfred.workflow.input.scriptfilter] Processing output 'alfred.workflow.action.script' with arg 'markdown'

[ERROR: alfred.workflow.action.script] Code 0: 16:26:10 pandoctor.py:1206 DEBUG    {u'<argument>': u'markdown',

 u'<flag>': u'in_format',

 u'config': False,

 u'help': False,

 u'launch': False,

 u'run': False,

 u'search': False,

 u'store': True}

16:26:10 workflow.py:940 DEBUG    Loading cached data from : /Users/skellis/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.hackademic.pandoctor/runner.cache

16:26:10 workflow.py:940 DEBUG    Loading cached data from : /Users/skellis/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.hackademic.pandoctor/pandoc.cache

16:26:10 workflow.py:970 DEBUG    Cached data saved at : /Users/skellis/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.hackademic.pandoctor/runner.cache

[iNFO: alfred.workflow.action.script] Processing output 'alfred.workflow.output.script' with arg ''

[ERROR: alfred.workflow.output.script] Code 0: 16:26:10 pandoctor.py:1206 DEBUG    {u'<argument>': u'',

 u'<flag>': u'pandoc_outputs',

 u'config': False,

 u'help': False,

 u'launch': True,

 u'run': False,

 u'search': False,

 u'store': False}

16:26:10 workflow.py:940 DEBUG    Loading cached data from : /Users/skellis/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.hackademic.pandoctor/runner.cache

16:26:10 workflow.py:940 DEBUG    Loading cached data from : /Users/skellis/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.hackademic.pandoctor/pandoc.cache

[ERROR: alfred.workflow.input.scriptfilter] Code 0: 16:26:10 pandoctor.py:1206 DEBUG    {u'<argument>': u'',

 u'<flag>': u'outputs',

 u'config': False,

 u'help': False,

 u'launch': False,

 u'run': False,

 u'search': True,

 u'store': False}

16:26:10 workflow.py:940 DEBUG    Loading cached data from : /Users/skellis/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.hackademic.pandoctor/runner.cache

16:26:10 workflow.py:940 DEBUG    Loading cached data from : /Users/skellis/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.hackademic.pandoctor/pandoc.cache

[ERROR: alfred.workflow.input.scriptfilter] Code 0: 16:26:14 pandoctor.py:1206 DEBUG    {u'<argument>': u'd',

 u'<flag>': u'outputs',

 u'config': False,

 u'help': False,

 u'launch': False,

 u'run': False,

 u'search': True,

 u'store': False}

16:26:14 workflow.py:940 DEBUG    Loading cached data from : /Users/skellis/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.hackademic.pandoctor/runner.cache

16:26:14 workflow.py:940 DEBUG    Loading cached data from : /Users/skellis/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.hackademic.pandoctor/pandoc.cache

[ERROR: alfred.workflow.input.scriptfilter] Code 0: 16:26:14 pandoctor.py:1206 DEBUG    {u'<argument>': u'do',

 u'<flag>': u'outputs',

 u'config': False,

 u'help': False,

 u'launch': False,

 u'run': False,

 u'search': True,

 u'store': False}

16:26:14 workflow.py:940 DEBUG    Loading cached data from : /Users/skellis/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.hackademic.pandoctor/runner.cache

16:26:14 workflow.py:940 DEBUG    Loading cached data from : /Users/skellis/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.hackademic.pandoctor/pandoc.cache

[ERROR: alfred.workflow.input.scriptfilter] Code 0: 16:26:15 pandoctor.py:1206 DEBUG    {u'<argument>': u'doc',

 u'<flag>': u'outputs',

 u'config': False,

 u'help': False,

 u'launch': False,

 u'run': False,

 u'search': True,

 u'store': False}

16:26:15 workflow.py:940 DEBUG    Loading cached data from : /Users/skellis/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.hackademic.pandoctor/runner.cache

16:26:15 workflow.py:940 DEBUG    Loading cached data from : /Users/skellis/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.hackademic.pandoctor/pandoc.cache

[iNFO: alfred.workflow.input.scriptfilter] Processing output 'alfred.workflow.action.script' with arg 'docx'

[ERROR: alfred.workflow.action.script] Code 0: 16:26:16 pandoctor.py:1206 DEBUG    {u'<argument>': u'docx',

 u'<flag>': u'out_format',

 u'config': False,

 u'help': False,

 u'launch': False,

 u'run': False,

 u'search': False,

 u'store': True}

16:26:16 workflow.py:940 DEBUG    Loading cached data from : /Users/skellis/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.hackademic.pandoctor/runner.cache

16:26:16 workflow.py:940 DEBUG    Loading cached data from : /Users/skellis/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.hackademic.pandoctor/pandoc.cache

16:26:16 workflow.py:970 DEBUG    Cached data saved at : /Users/skellis/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.hackademic.pandoctor/runner.cache

[iNFO: alfred.workflow.action.script] Processing output 'alfred.workflow.output.script' with arg ''

[ERROR: alfred.workflow.output.script] Code 0: 16:26:16 pandoctor.py:1206 DEBUG    {u'<argument>': u'',

 u'<flag>': u'pandoc_options',

 u'config': False,

 u'help': False,

 u'launch': True,

 u'run': False,

 u'search': False,

 u'store': False}

16:26:16 workflow.py:940 DEBUG    Loading cached data from : /Users/skellis/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.hackademic.pandoctor/runner.cache

16:26:16 workflow.py:940 DEBUG    Loading cached data from : /Users/skellis/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.hackademic.pandoctor/pandoc.cache

[ERROR: alfred.workflow.input.scriptfilter] Code 0: 16:26:16 pandoctor.py:1206 DEBUG    {u'<argument>': u'',

 u'<flag>': u'options',

 u'config': False,

 u'help': False,

 u'launch': False,

 u'run': False,

 u'search': True,

 u'store': False}

16:26:16 workflow.py:940 DEBUG    Loading cached data from : /Users/skellis/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.hackademic.pandoctor/runner.cache

16:26:16 workflow.py:940 DEBUG    Loading cached data from : /Users/skellis/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.hackademic.pandoctor/pandoc.cache

[iNFO: alfred.workflow.input.scriptfilter] Processing output 'alfred.workflow.action.script' with arg '[done]'

[iNFO: alfred.workflow.trigger.external] Processing output 'alfred.workflow.action.script' with arg 'gui'

[ERROR: alfred.workflow.action.script] Code 0: 16:26:18 pandoctor.py:1206 DEBUG    {u'<argument>': u'[done]',

 u'<flag>': u'options',

 u'config': False,

 u'help': False,

 u'launch': False,

 u'run': False,

 u'search': False,

 u'store': True}

16:26:18 workflow.py:940 DEBUG    Loading cached data from : /Users/skellis/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.hackademic.pandoctor/runner.cache

16:26:18 workflow.py:940 DEBUG    Loading cached data from : /Users/skellis/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.hackademic.pandoctor/pandoc.cache

[iNFO: alfred.workflow.action.script] Processing output 'alfred.workflow.output.script' with arg '[pause]

'

[ERROR: alfred.workflow.action.script] Code 0: 16:26:18 pandoctor.py:1206 DEBUG    {u'<argument>': None,

 u'<flag>': u'gui',

 u'config': False,

 u'help': False,

 u'launch': False,

 u'run': True,

 u'search': False,

 u'store': False}

16:26:18 workflow.py:940 DEBUG    Loading cached data from : /Users/skellis/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.hackademic.pandoctor/runner.cache

16:26:18 workflow.py:940 DEBUG    Loading cached data from : /Users/skellis/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.hackademic.pandoctor/pandoc.cache

16:26:18 pandoctor.py:1092 DEBUG    [u'/usr/local/bin/pandoc', u'--from=markdown', u'--to=docx', u'--parse-raw', u'--smart', u'--normalize', u'--standalone', u'--template=, u'--reference-docx=reference.docx', u'--output=/Users/skellis/Downloads/rose.docx', u'/Users/skellis/Downloads/rose.md]

pandoc: Could not find data file templates/.docx

16:26:18 pandoctor.py:1098 DEBUG

[iNFO: alfred.workflow.action.script] Processing output 'alfred.workflow.output.notification' with arg ''

[ERROR: alfred.workflow.output.script] Code 0: 16:26:18 pandoctor.py:1206 DEBUG    {u'<argument>': u'[pause]\n',

 u'<flag>': u'pandoc_options',

 u'config': False,

 u'help': False,

 u'launch': True,

 u'run': False,

 u'search': False,

 u'store': False}

16:26:18 workflow.py:940 DEBUG    Loading cached data from : /Users/skellis/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.hackademic.pandoctor/runner.cache

16:26:18 workflow.py:940 DEBUG    Loading cached data from : /Users/skellis/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.hackademic.pandoctor/pandoc.cache

Link to comment

Ok. It appears that the pandoc command created is wonky:

16:26:18 pandoctor.py:1092 DEBUG    [u'/usr/local/bin/pandoc', u'--from=markdown', u'--to=docx', u'--parse-raw', u'--smart', u'--normalize', u'--standalone', u'--template=', u'--reference-docx=reference.docx', u'--output=/Users/skellis/Downloads/rose.docx', u'/Users/skellis/Downloads/rose.md']
pandoc: Could not find data file templates/.docx
As you can see, there is no template specified. How are you choosing the template in the options?
Link to comment

Have you added template to your defaults at some point? Either that, or you selected it as one of your options, but you didn't supply a value (in this case, the path to the template).

However template= got into the command, that's what is breaking Pandoctor. So, if it's in defaults, we just need to remove it. If you selected it, just don't do that without entering a path.

Also, have you created any templates, in the Pandoctor sense? FWIW, that is really the best way to use Pandoctor. Create a template command with exactly the flags that you need, and use that, rather than creating one of the fly. TBH, the on the fly conversion is there for simple stuff. My rule of thumb is, if you start selecting lots of options when running an on-the-fly conversion, you should probably just make it a template.

Link to comment

Thanks Stephen. 

I've been working on using reference documents but perhaps selected a template accidentally. So, no, no templates selected (working my way up to using them). 

In the short term, how do I take the 

template=

 out of the command?

 

cheers

Simon

Link to comment

Go the workflow's data directory (~/Library/Application Support/Alfred 2/Workflow Data/com.hackademic.pandoctor/). Is there a file called user_defaults.json? If so, open it and send me the contents. If you haven't selected template in the options stage of the conversion, then it must be in your defaults.

Link to comment

There are two files in there (both with no contents):

- user_ignore.json

- user_templates.json

 

When I look at the template option during a pandoctor conversrion the [template] option is selected – don't seem to be able to unselect it like I can with other options ...

 

ske

Link to comment

This is truly odd. I have a clean install working perfectly on my machine. I'm going to need *all* the information to get to the bottom of this. So, what version of Pandoctor do you have? What version of Alfred? How did you download the workflow? What is in the workflow directory? In the data directory? In the cache directory?

Link to comment

Some details:

Pandoc: pandoc-1.13.2

Pandoctor V1.0.5 downloaded from http://www.packal.org/workflow/pandoctor

Alfred: v2.5.1 (308)

in Folder "Workflow Data" there is a single folder: "com.hackademic.pandoctor". In that folder are two files:

- user_ignore.json

- user_templates.json

 

There's no cache directory in Alfred 2 Application support dir.

 

Anything I've missed?

 

Thanks again for your swift responses.

ske

Link to comment
  • 3 months later...

Hi, 

 

I'm running pandoctor but cannot pass the configuration process. After hitting enter once I type dr:config I get the following message: <?xml version="1.0" encoding=   And, of course, pandoctor is not configured.

 

Is there a way to solve this?

 

I downloaded the workflow from Packal (I have version 1.0.5).

 

 

Link to comment
  • 3 weeks later...

Hi, 

 

I'm running pandoctor but cannot pass the configuration process. After hitting enter once I type dr:config I get the following message: <?xml version="1.0" encoding=   And, of course, pandoctor is not configured.

 

Is there a way to solve this?

 

I downloaded the workflow from Packal (I have version 1.0.5).

You need to run the command with Alfred's debugger on and post the results so I can have a better idea of what broke.

 

One common issue tho:

 

+ do you have pandoc already installed?

Link to comment

Some details:

Pandoc: pandoc-1.13.2

Pandoctor V1.0.5 downloaded from http://www.packal.org/workflow/pandoctor

Alfred: v2.5.1 (308)

in Folder "Workflow Data" there is a single folder: "com.hackademic.pandoctor". In that folder are two files:

- user_ignore.json

- user_templates.json

 

There's no cache directory in Alfred 2 Application support dir.

 

Anything I've missed?

 

Thanks again for your swift responses.

ske

Ok. I know I've been MIA, but life...

 

Anyways, I've given this a think and I believe I understand the problem. At some point, you *did* choose template as an option and you failed to pass an argument. When you tried to run this conversion, pandoc and therefore Pandoctor failed. However, there is a bug such that this failure wasn't properly handled, and this attempted run was retained in the cache. So, the "template=" option was retained in all subsequent runs. 

 

This is a bug. Thank you for finding it. And I'm quite sorry that it took me this long to figure it out. To fix the problem, go to "~/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.hackademic.pandoctor" and delete "runner.cache" then run a new conversion. When I get free, I will work on a fix for the bug and push an update.

 

One thing to note on using a reference.docx file, tho: be sure to pass the full path to the correct document (not a relative path, like in your example above) as the argument for the option. Or else this will cause pandoc to fail as well. You can get the full path by navigating to the file in Alfred and using the Copy Path to Clipboard function in Alfred's file browser.

Link to comment
  • 3 weeks later...

I also get the error message: <?xml version="1.0" encoding=

when I try to configure pandoctor.

 

pandoc 1.14.0.1 is installed on the computer.

pandoc works fine from the terminal but pandoctor does not. 

 

Here  ist the debug log: 

 

[ERROR: alfred.workflow.action.script] 21:00:21 pandoctor.py:1206 DEBUG    {u'<argument>': None,

 u'<flag>': None,
 u'config': True,
 u'help': False,
 u'launch': False,
 u'run': False,
 u'search': False,
 u'store': False}
21:00:21 workflow.py:940 DEBUG    Loading cached data from : /Users/j********/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.hackademic.pandoctor/runner.cache
21:00:22 workflow.py:1275 ERROR    'NoneType' object has no attribute 'read'
Traceback (most recent call last):
  File "/Users/j********/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.60CECC29-7BBE-4EE5-B5FC-C222BEEEFC55/workflow/workflow.py", line 1273, in run
    func(self)
  File "pandoctor.py", line 1208, in main
    res = pd.run(args)
  File "pandoctor.py", line 355, in run
    return method()
  File "pandoctor.py", line 429, in config_codepath
    self.pandoc.config()
  File "pandoctor.py", line 121, in config
    self.store('pandoc', 'outputs', self._formats('output'))
  File "pandoctor.py", line 226, in _formats
    lines = req.text.splitlines()
  File "/Users/j*******/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.60CECC29-7BBE-4EE5-B5FC-C222BEEEFC55/workflow/web.py", line 220, in text
    return self.content
  File "/Users/j********/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.60CECC29-7BBE-4EE5-B5FC-C222BEEEFC55/workflow/web.py", line 205, in content
    self._content = self.raw.read()
AttributeError: 'NoneType' object has no attribute 'read'
Link to comment
  • 3 months later...

Hi, 

 

Same problem

 

Pandoc version 1.15.0.6, Pandoctor version 1.0.5.

 

I'm running pandoctor but cannot pass the configuration process. After hitting enter once I type dr:config I get the following message: <?xml version="1.0" encoding=   And, of course, pandoctor is not configured.

 

Is there a way to solve this?

 

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...