question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Synctex fails on windows

See original GitHub issue

Jupyterlab 0.32.1 jupyterlab_latex 0.3.0 MikTex 2.9.6500

It appears that it is searching for files in the wrong location. (note the ‘uri’ in the traceback)

From the server console after clicking “scroll pdf to cursor” on the .tex fail:

Uncaught exception GET /latex/synctex/gryoscope.pdf?page=1#x=0&y=0&1525389931568 (127.0.0.1)
    HTTPServerRequest(protocol='http', host='localhost:8888', method='GET', uri='/latex/synctex/gryoscope.pdf?page=1&x=0&y=0&1525389931568', version='HTTP/1.1', remote_ip='127.0.0.1')
    Traceback (most recent call last):
      File "E:\ProgramData\Anaconda3\lib\site-packages\tornado\web.py", line 1543, in _execute
        result = yield result
      File "E:\ProgramData\Anaconda3\lib\site-packages\tornado\gen.py", line 1099, in run
        value = future.result()
      File "E:\ProgramData\Anaconda3\lib\site-packages\tornado\gen.py", line 1107, in run
        yielded = self.gen.throw(*exc_info)
      File "E:\ProgramData\Anaconda3\lib\site-packages\jupyterlab_latex\synctex.py", line 189, in get
        out = yield self.run_synctex(cmd)
      File "E:\ProgramData\Anaconda3\lib\site-packages\tornado\gen.py", line 1099, in run
        value = future.result()
      File "E:\ProgramData\Anaconda3\lib\site-packages\tornado\gen.py", line 1107, in run
        yielded = self.gen.throw(*exc_info)
      File "E:\ProgramData\Anaconda3\lib\site-packages\jupyterlab_latex\synctex.py", line 143, in run_synctex
        code, output = yield run_command(cmd)
      File "E:\ProgramData\Anaconda3\lib\site-packages\tornado\gen.py", line 1099, in run
        value = future.result()
      File "E:\ProgramData\Anaconda3\lib\site-packages\tornado\gen.py", line 296, in wrapper
        result = func(*args, **kwargs)
      File "E:\ProgramData\Anaconda3\lib\types.py", line 248, in wrapped
        coro = func(*args, **kwargs)
      File "E:\ProgramData\Anaconda3\lib\site-packages\jupyterlab_latex\util.py", line 25, in run_command_sync
        process = subprocess.run(cmd, stdout=subprocess.PIPE)
      File "E:\ProgramData\Anaconda3\lib\subprocess.py", line 403, in run
        with Popen(*popenargs, **kwargs) as process:
      File "E:\ProgramData\Anaconda3\lib\subprocess.py", line 709, in __init__
        restore_signals, start_new_session)
      File "E:\ProgramData\Anaconda3\lib\subprocess.py", line 997, in _execute_child
        startupinfo)
    FileNotFoundError: [WinError 2] The system cannot find the file specified

gyroscope.(tex/pdf/synctex.gz) are all in the same folder (at the base of the directories accessible given where I started the server)

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:23 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
ian-r-rosecommented, Aug 18, 2018

Hi @t-makaro, I’ve just published a new release of the python package (v0.4.0) which uses absolute paths for the SyncTeX requests. In my testing, this appears to resolve the issue. Let me know if that fixes things for you, and thanks for your patience!

1reaction
ian-r-rosecommented, May 5, 2018

Okay, I can reproduce this on Windows, but not on Linux. It seems the issue is with the SyncTex being extremely picky about absolute vs relative paths in the file names passed to it, and some versions of synctex don’t accept relative paths at all.

This discussion is helpful in working this out. It will be a pain, but I think it is fixable. I must say, SyncTeX’s CLI is not very robust.

Read more comments on GitHub >

github_iconTop Results From Across the Web

SyncTeX not working right with LuaLaTeX in TeX Live
I am writing my documents using TeXstudio with TeX Live on Windows (all up to date). After typesetting a document with SyncTeX (which...
Read more >
Fix !pdflatex - synctex=1 -interaction=nonstopmode %.tex error ...
Fix Laxtex errors when installing Tex-maker or Tex-studio on your new PC under Windows10 or Windows11Error 1:!pdflatex - synctex =1 ...
Read more >
[TeXstudio-list] Texstudio 2.12.10 under windows 10
Under windows 10 (build 1803, I think) I have installed texlive2018 without error. I did not seem to have to build the format...
Read more >
Synctex not working - RStudio IDE
Hi all, I've been trying to figure out a way to make synctex work but I could not find ... Synctex not working...
Read more >
MiKTeX, LaTeX: Error with \newwrite output file and writing ...
6.5 (MiKTeX 20.7) on Windows 10 Home, I am trying to write a line to a text file. When typesetting this code \documentclass{article}...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found