-
Notifications
You must be signed in to change notification settings - Fork 391
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
pplatex something went wrong with parsing log files #2144
Comments
I believe this should work now, please test. |
Sorry, but I still get the same error: "Something went wrong...". I honestly have no idea how to further troubleshoot the problem. (A minimal main.tex and subfile sub.tex works fine, with the quickfix list shown) |
Ok. Well, I can't really help much if you can't describe how to reproduce the problem reliably... :( One possibility is this: In a project where you have this problem, do this:
Now, if we're lucky, this means that it is sufficient to share either the |
Hi lervag, apologies for my late reply. Appreciate your response, I checked again, but unfortunately, I could not resolve it. The details are as below. This problem happens for my usual config, and for this specific project. Each time I press I followed the steps you outlined above:
Yes, reproducible.
Ok.
There is now no problem here. The quickfix window opens, with the following contents:
So, it seems that the error is only for this particular tex file (or actually, this particular project across multiple files). I cleared all aux and intermediate files, leaving only the tex files, and compiled with Do you have any impression as to where the problem might be? |
Just to be pedantic: After you have done step 1, can you repeat it and make sure to only do Next, in step 2: are you using the same file names as the original files? If not, please try that and report. If that did not bring us closer, then we need to dig deeper. Can you go to Lines 55 to 60 in f1db6a5
The idea is to allow the full error message to be shown. That might help locate the origin of the problem. Another possibility is for you to slowly simplify your project until the problem disappears. E.g. comment out half of your content; if it still fails, continue with the next half. And so on, sort of like a bisection. With this method, it should not take too long to find the lines that result in the error message. Yet another possibility is for you to share the original source files with me. I understand that this may not be desirable, so that's only left as a suggestion in case you're comfortable with it. |
Looks like the root cause has been found --- spaces in filenames, or filepaths.
Yes, same file names were used. However, I noticed that the directory of my actual project has a space in it. To illustrate, the full path to the tex file in my test project is
Commenting lines 55-60 in vimtex/autoload/vimtex/qf.vim gives the error message: "~\Desktop\a1\orient metric.tex" [unix] 214L, 10062C
Error detected while processing function vimtex#qf#toggle[4]..vimtex#qf#open[4]..vimtex#qf#setqflist[25]..334[9]..vimtex#qf#u#caddfile:
line 7:
E40: Can't open errorfile C:\Users\Bertrand\Desktop\a1/orient metric.pplatex
Error detected while processing function vimtex#qf#toggle:
line 4:
E171: Missing :endif Finally, I'm on a windows OS (have not tested on Mac or Linux). |
Ah, nice, then we're getting closer. I still can't reproduce this on Linux, though, so it seems there is something that may be problematic only on Windows. Could you add some https://github.com/lervag/vimtex/blob/master/autoload/vimtex/qf/pplatex.vim#L82-L93 unsilent echo 'DBG1' printf('pplatex -i %s >%s', l:log, l:tmp)
silent call system(printf('pplatex -i %s >%s', l:log, l:tmp))
unsilent echo 'DBG2' l:tmp
call vimtex#qf#u#caddfile(self, l:tmp)
silent call delete(l:tmp) vimtex/autoload/vimtex/qf/u.vim Lines 7 to 16 in f1db6a5
unsilent echo 'DBG3' a:file
noautocmd execute 'caddfile' a:file On my end, the output look like this:
Notice how the spaces are escaped with a backslash. The backslashes are added by |
Can you test if things work if you change to the following: let l:tmp = fnamemodify(a:log, ':r') . '.pplatex'
let l:log = a:log
silent call system(printf('pplatex -i "%s" >"%s"', l:log, l:tmp)) (Remove the |
Edit: I did not place the I also tested on filepaths which have no spaces (as a control).
, and the qf window did not open (an error).
This works! The qf window was shown. Now, here is where things get interesting.
This works. The qf window was shown. (After deleting the .pplatex file manually, there was no debugging output, as before.) |
Also, changing the 'shellslash' setting made no difference to the above output |
It's interesting that in your examples, the path is |
I found the mix of |
Great, then I think this is finally solved. Could you update and confirm? |
It works well with the latest pushed commit. Thank you for the help, much appreciated :) |
Great; glad to hear it and glad to help! |
Description
I recently switched to using pplatex to parse log files (Previously I used latexlog, but in a multifile project, the quickfix list showed that the errors/warnings were in the main file, when it should be in the subfiles).
Now, when I hit
\le
, I get the following error: "Something went wrong when parsing log files!"Here is the relevant log file: orient_metric.log
Running
pplatex -i orient_metric.log
, I get the following outputThe relevant vimtex config are as follows:
Let me know if more info is required!
Steps to reproduce
No response
Expected behavior
No response
Actual behavior
No response
Do you use a latexmkrc file?
No
VimtexInfo
The text was updated successfully, but these errors were encountered: