haghish / markdoc

A literate programming package for Stata which develops dynamic documents, slides, and help files in various formats
http://haghish.com/markdoc
87 stars 30 forks source link

Format error #11

Closed louisdecharson closed 7 years ago

louisdecharson commented 7 years ago

Hi,

I've installed your software and ran my first code and got the following error :

. qui log c
. markdoc notes, replace export(html) install
zsh:1: exec format error: /Users/louisdecharson/Library/Application Support/Stata/ado/plus
> /Weaver/Pandoc/pandoc
file /var/folders/02/cwcbsfc51pxd3kbhf685j5v80000gn/T//S_36241.000001.html not found

I'm not sure this is the right place to post it but I haven't be able to find any help on the web concerning that error. I'd be grateful if you have any clue.

Best,

Louis

haghish commented 7 years ago

Last week I slightly changed the engine to support working with MarkDoc on Windows servers. In any case, Mac users should never have a trouble with MarkDoc so this is weird.

However, I will need more information before I can help you.

  1. Report your Stata version and Mac OSX version
  2. Please reinstall the current MarkDoc version (3.8.0)
  3. Try markdoc, test install which test the installation and report what happenes.
  4. If there is an error, please email me a log file
louisdecharson commented 7 years ago

Hi,

Thanks for your prompt reply. I reinstalled Pandoc by doing : net install markdoc, replace from("https://raw.githubusercontent.com/haghish/markdoc/master/")

Then I run markdoc, test install

It installed wkhtmltopdf and then I got the following errors :


Running MarkDoc Test

The example do-file is successfully executed. Next, MarkDoc attempts to compile a HTML and PDF document

zsh:1: exec format error: /Users/louisdecharson/Library/Application Support/Stat

a/ado/plus/Weaver/Pandoc/pandoc (MarkDoc created example.html)

zsh:1: exec format error: /Users/louisdecharson/Library/Application Support/Stat

a/ado/plus/Weaver/Pandoc/pandoc (MarkDoc created example.pdf)

MarkDoc works properly. May The Source Be With You! ;)

It states that Markdoc works properly, however, the example.pdf and example.html are both empty.

Thanks a lot for your time !

Best,

Louis

On 24 Sep 2016, at 09:59, E. F. Haghish notifications@github.com wrote:

Last week I slightly changed the engine to support working with MarkDoc on Windows servers. In any case, Mac users should never have a trouble with MarkDoc so this is weird.

However, I will need more information before I can help you.

Please reinstall the current version (3.8.0) Try markdoc, test install which test the installation and report what happenes. If there is an error, please email me a log file — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

haghish commented 7 years ago

Next, we should test Pandoc. Run the following code in Stata and report whether the manual.html is created correctly:

. copy "http://pandoc.org/demo/MANUAL.txt" manual.txt
. pandoc manual.txt -o manual.html
louisdecharson commented 7 years ago

I've MacOS 10.9.5 (Mavericks) and Stata 14.1 for Mac

I'm using zsh as a bash.

Btw, I've reinstalled pandoc by homebrew and tried to run net install statax, from("https://raw.githubusercontent.com/haghish/statax/master/") (I've used ssc install statax and I got the error : the following files already exist and are different: /Users/louisdecharson/Library/Application Support/Stata/ado/plus/s/statax.ado /Users/louisdecharson/Library/Application Support/Stata/ado/plus/s/stataxmain.ado /Users/louisdecharson/Library/Application Support/Stata/ado/plus/s/stataxstyle.ado /Users/louisdecharson/Library/Application Support/Stata/ado/plus/s/stataxsyn.ado /Users/louisdecharson/Library/Application Support/Stata/ado/plus/s/statax.sthlp /Users/louisdecharson/Library/Application Support/Stata/ado/plus/s/statax.tex

no files installed or copied (no action taken)

On 24 Sep 2016, at 11:07, E. F. Haghish notifications@github.com wrote:

What is your Stata and Mac OSX version? — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

haghish commented 7 years ago

Next, we should test Pandoc. Run the following code in Stata and report whether the manual.html is created correctly:

. copy "http://pandoc.org/demo/MANUAL.txt" manual.txt
. pandoc manual.txt -o manual.html
louisdecharson commented 7 years ago

This is what is not working. I got the following error :

. pandoc manual.txt -o manual.html /Users/louisdecharson/Library/Application Support/Stata/ado/plus/Weaver/Pandoc/p

andoc manual.txt -o manual.html

zsh:1: exec format error: /Users/louisdecharson/Library/Application Support/Stat

a/ado/plus/Weaver/Pandoc/pandoc

On 24 Sep 2016, at 11:26, E. F. Haghish notifications@github.com wrote:

Next, we should test Pandoc. Run the following code in Stata and report whether the manual.html is created correctly:

. copy "http://pandoc.org/demo/MANUAL.txt" manual.txt . pandoc manual.txt -o manual.html — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

haghish commented 7 years ago

Also, if Pandoc is installed manually, you should use the pandoc(str) to define the path. Or alternatively, use weave setup command to define the path to Pandoc permanently.

haghish commented 7 years ago

Ok, so it is clear that the problem is caused by Pandoc! And has nothing to do with MarkDoc. The pandoc command simply does:

! path/to/pandoc pandoc-command

So, you have to figure out what is wrong with Pandoc on your machine. Here are a few suggestions:

. copy "http://pandoc.org/demo/MANUAL.txt" manual.txt
. ! path/to/pandoc manual.txt -o manual.html

This should work if you have installed Pandoc correctly. If it works, adds this to your permanent path as I explained above.

Anyways, the problem is not caused by markdoc

louisdecharson commented 7 years ago

I've deleted the markdoc-installed pandoc version as you advised and used the one I've already have on my system and this is working like a charm. Thanks a lot !

haghish commented 7 years ago

Glad we got this sorted out! I will update MarkDoc to give priority to user-defined path. I think it is already implemented but I will double check. In general, if the user has defined a path for Pandoc and wkhtmltopdf, the automatically installed software will be ignored.

Anyway, enjoy! ;)