1

I have some problem to generate pdf file after calling pdflatex under TextMate. I work under Mac OS 13 and I know that The LaTeX-Bundle of TextMate was not updated in time for the release of MacOS 12.3. So I followed the procedure here : Textmate latex compilation : pb with python version after macOS update Monterey 12.3

but I have problem with parsing.py. I have this message at the end (when the compilation stops) :

Traceback (most recent call last): 
File "/Users/jimmy/Library/Application Support/TextMate/Managed/Bundles/LaTeX.tmbundle/Support/bin/texmate.py", line 1014, in status = command_parser.parse_stream() 
File "/Users/jimmy/Library/Application Support/TextMate/Managed/Bundles/LaTeX.tmbundle/Support/lib/Python/parsing.py", line 770, in parse_stream return super(LaTexMkParser, self).parse_stream() 
File "/Users/jimmy/Library/Application Support/TextMate/Managed/Bundles/LaTeX.tmbundle/Support/lib/Python/parsing.py", line 187, in parse_stream function(matching, line) 
File "/Users/jimmy/Library/Application Support/TextMate/Managed/Bundles/LaTeX.tmbundle/Support/lib/Python/parsing.py", line 789, in start_latex fatal_error, number_errors, number_warnings = parser.parse_stream() 
File "/Users/jimmy/Library/Application Support/TextMate/Managed/Bundles/LaTeX.tmbundle/Support/lib/Python/parsing.py", line 610, in parse_stream return super(LaTexParser, self).parse_stream() 
File "/Users/jimmy/Library/Application Support/TextMate/Managed/Bundles/LaTeX.tmbundle/Support/lib/Python/parsing.py", line 194, in parse_stream line = self.get_rewrapped_line() 
File "/Users/jimmy/Library/Application Support/TextMate/Managed/Bundles/LaTeX.tmbundle/Support/lib/Python/parsing.py", line 139, in get_rewrapped_line line = to_utf8(self.input_stream.readline()) 
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/codecs.py", line 322, in decode (result, consumed) = self._buffer_decode(data, self.errors, final) UnicodeDecodeError: 'utf-8' codec can't decode byte 0xee in position 92: invalid continuation byte

Thank you very much for your help. PS : The compilation works with texshop, I don't think it is a latex problem

I fixed it as follows:

  • /usr/bin/python3 -m pip install pyobjc --user
  • cd ~/Library/Application\ Support/TextMate/Managed/Bundles/LaTeX.tmbundle/Support/bin
  • Change “python” to “python3” in the header of all .py files (configure.py, btexdoc.py, texmate.py, texparser.py)

But I still have a problem...

Wolric
  • 701
  • 1
  • 2
  • 18
  • Same here, some .tex files produce that parsing error, while other compile just fine. I do believe everything is UTF8 in my setup, so I don't know why this error would arise. this is especially frustrating, since -- if I'm not mistaken -- the code involved is only used by TextMate to parse the log files... – Bibi Jan 30 '23 at 09:10

2 Answers2

1

This issue has now been solved in issue #198 of latex.tmbundle's github.

As far as I can tell the problem was fixed in the latest version of the Bundle in the repository. At least I was not able to reproduce the problem using the steps provided in the first post.

Machavity
  • 30,841
  • 27
  • 92
  • 100
Bibi
  • 111
  • 3
0

In my case it helped to rename the python binary in the mentioned directory

~/Library/Application\ Support/TextMate/Managed/Bundles/LaTeX.tmbundle/Support/bin

from "python" to "python3".

Felix
  • 11
  • 1