regro / regolith

Research Group Content Managment System
http://regro.github.io/regolith-docs/
Other
15 stars 71 forks source link

more subprocess woes #206

Closed sbillinge closed 6 years ago

sbillinge commented 6 years ago

@CJ-Wright Thanks for looking at this.

loading ..\db\presentations.yml...
loading ../../rg-db-public/db\groups.yml...
loading ../../rg-db-public/db\institutions.yml...
loading ../../rg-db-public/db\people.yml...
loading ../../rg-db-public/db\projects.yml...
xonsh: For full traceback set: $XONSH_SHOW_TRACEBACK = True
xonsh: subprocess mode: command not found: dvipdf
Traceback (most recent call last):
  File "C:/Users/simon/Anaconda3/envs/bg/Scripts/regolith", line 6, in <module>
    exec(compile(open(__file__).read(), __file__, 'exec'))
  File "C:\Users\simon\dev\regolith\scripts\regolith", line 3, in <module>
    main()
  File "c:\users\simon\dev\regolith\regolith\main.py", line 254, in main
    CONNECTED_COMMANDS[rc.cmd](rc)
  File "c:\users\simon\dev\regolith\regolith\commands.py", line 113, in build
    bldr.build()
  File "c:\users\simon\dev\regolith\regolith\builders\basebuilder.py", line 103, in build
    getattr(self, cmd)()
  File "c:\users\simon\dev\regolith\regolith\builders\preslistbuilder.py", line 239, in latex
    self.pdf(outfile)
  File "c:\users\simon\dev\regolith\regolith\builders\basebuilder.py", line 133, in pdf
    self.run(["dvipdf", base])
  File "c:\users\simon\dev\regolith\regolith\builders\basebuilder.py", line 124, in run
    subprocess.run(cmd, cwd=self.bldir, check=True)
  File "C:\Users\simon\Anaconda3\envs\bg\lib\site-packages\xonsh\lib\subprocess.xsh", line 14, in run
    p = ![@(cmd)]
  File "C:\Users\simon\Anaconda3\envs\bg\lib\site-packages\xonsh\__amalgam__.py", line 19553, in subproc_captured_hiddenobject
    return run_subproc(cmds, captured='hiddenobject')
  File "C:\Users\simon\Anaconda3\envs\bg\lib\site-packages\xonsh\__amalgam__.py", line 19516, in run_subproc
    command.end()
  File "C:\Users\simon\Anaconda3\envs\bg\lib\site-packages\xonsh\__amalgam__.py", line 12724, in end
    self._end(tee_output=tee_output)
  File "C:\Users\simon\Anaconda3\envs\bg\lib\site-packages\xonsh\__amalgam__.py", line 12743, in _end
    self._raise_subproc_error()
  File "C:\Users\simon\Anaconda3\envs\bg\lib\site-packages\xonsh\__amalgam__.py", line 12864, in _raise_subproc_error
    output=self.output)
subprocess.CalledProcessError: Command '['dvipdf', 'presentations-bg-cwright']' returned non-zero exit status 1
CJ-Wright commented 6 years ago

Do you have dvipdf on your machine? How do you build PDFs from Tex?

sbillinge commented 6 years ago

I use MikTex but not sure how to allow regolith to find it? Is there some kind of tex path that needs to be set up?

On Wed, Aug 15, 2018 at 2:21 PM Christopher J. Wright < notifications@github.com> wrote:

Do you have dvipdf on your machine? How do you build PDFs from Tex?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/regro/regolith/issues/206#issuecomment-413288815, or mute the thread https://github.com/notifications/unsubscribe-auth/AEDrUb2DV2Kg_lO_efdtPKLUijizusqSks5uRGabgaJpZM4V-i69 .

CJ-Wright commented 6 years ago

What is the command you run for building PDFs? (or command sequence)

sbillinge commented 6 years ago

either latex or pdflatex works, though I generally build from my winedt IDE

On Wed, Aug 15, 2018 at 3:01 PM Christopher J. Wright < notifications@github.com> wrote:

What is the command you run for building PDFs?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/regro/regolith/issues/206#issuecomment-413300882, or mute the thread https://github.com/notifications/unsubscribe-auth/AEDrUSr3Hwqj6883cY1JnzfJjIiJqhNsks5uRHAkgaJpZM4V-i69 .

CJ-Wright commented 6 years ago

The current command sequence is:

self.run(["latex"] + LATEX_OPTS + [base + ".tex"])
self.run(["bibtex"] + [base + ".aux"])
self.run(["latex"] + LATEX_OPTS + [base + ".tex"])
self.run(["latex"] + LATEX_OPTS + [base + ".tex"])
self.run(["dvipdf", base])

Maybe we can provide the option to run pdflatex? @scopatz thoughts?

sbillinge commented 6 years ago

I have dvips which could then be converted to pdf with ps2pdf, or we could just replace latex with pdflatex and remove the ``dvipdf```? Not sure the downsides to that but it would work for me then.....

On Wed, Aug 15, 2018 at 3:50 PM Christopher J. Wright < notifications@github.com> wrote:

The current command sequence is:

self.run(["latex"] + LATEX_OPTS + [base + ".tex"])self.run(["bibtex"] + [base + ".aux"])self.run(["latex"] + LATEX_OPTS + [base + ".tex"])self.run(["latex"] + LATEX_OPTS + [base + ".tex"])self.run(["dvipdf", base])

Maybe we can provide the option to run pdflatex? @scopatz https://github.com/scopatz thoughts?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/regro/regolith/issues/206#issuecomment-413314510, or mute the thread https://github.com/notifications/unsubscribe-auth/AEDrUVCeVL23vbcg1lNTNn31b_Dm9Hycks5uRHuTgaJpZM4V-i69 .

CJ-Wright commented 6 years ago

I think we can inspect for windows and run pdflatex as the last command.

sbillinge commented 6 years ago

sounds good. It may not be a windows thing per-se, it is my particular setup. But I think my setup is some kind of more or less standard MikTex installation which is very common for windows users, so this could probably work.

S

On Wed, Aug 15, 2018 at 4:09 PM Christopher J. Wright < notifications@github.com> wrote:

I think we can inspect for windows and run pdflatex as the last command.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/regro/regolith/issues/206#issuecomment-413319773, or mute the thread https://github.com/notifications/unsubscribe-auth/AEDrUSLV0MlHAweabwUOOKs9sZdg7kizks5uRH_rgaJpZM4V-i69 .