Sublime Forum

Can no longer build latex files

#1

I can no longer build Latex files by clicking build or pressing command-B. The command-B next to the “build” option is greyed out. I don’t think I have installed anything new related to Sublime Text but I think I may have updated the version of Mac OS I am running to 12.2.1. I am running Sublime Text Build 4126.

0 Likes

#2

LaTeXTools has been migrated to python 3.8 as of version 4.0.0.

It requires Package Control 4 to also be installed in order for required dependencies (regex python package) to get installed and required default "channel"s to not been overridden by user settings.

An issue like that has been discussed on following issue, which also contains various hints and steps to resolve the issue. In case it doesn’t already recover after restarting ST, it is most likely an issue caused by your setup.

LaTeXTools is tested agains ST3176 and recent ST4 builds on Windows and Linux.

0 Likes

#3

I’m having trouble following that thread and it looks like the issue was different to mine anyway. How do I get Package Control 4?

0 Likes

#4

As ST’s installer currently only installs Package Control 3 (aka. PC3), the only way is to manually install it.

Required steps are outlined at

They install Package Control.sublime-package from https://github.com/wbond/package_control/releases.

Make sure to remove possibly existing Package Control folder in Packages directory.

  1. Open Main Menu > Preferences > Browse Packages…
  2. Delete Package Control folder, if it exists

Otherwise you might run into trouble due to PC3 partly overriding PC4.

PC4 automatically converts all existing dependencies as soon as it is loaded. A restart is required afterwads to get things sorted. It checks for missing or outdated libraries at startup, automatically.

You can call Package Control: Satisfy Libraries to do so, manually.

0 Likes

#5

I tried running

from urllib.request import urlretrieve;urlretrieve(url=“https://github.com/wbond/package_control/releases/latest/download/Package.Control.sublime-package”, filename=sublime.installed_packages_path() + ‘/Package Control.sublime-package’)

from the console, but got a lengthy error message that I’ll have to post in the next reply

0 Likes

#6

The error message:

Traceback (most recent call last):
File “/Applications/Sublime Text.app/Contents/MacOS/Lib/python38/sublime_plugin.py”, line 312, in reload_plugin
m = importlib.import_module(modulename)
File “./python3.8/importlib/init.py”, line 127, in import_module
File “”, line 1014, in _gcd_import
File “”, line 991, in _find_and_load
File “”, line 975, in _find_and_load_unlocked
File “”, line 671, in _load_unlocked
File “”, line 808, in exec_module
File “”, line 219, in _call_with_frames_removed
File “/Users/samthompson/Library/Application Support/Sublime Text 3/Packages/LaTeXTools/plugin.py”, line 26, in
from .latextools.biblatex_field_name_completions import (
File “/Users/samthompson/Library/Application Support/Sublime Text 3/Packages/LaTeXTools/latextools/biblatex_field_name_completions.py”, line 182, in
bibtex_fields = [
File “/Users/samthompson/Library/Application Support/Sublime Text 3/Packages/LaTeXTools/latextools/biblatex_field_name_completions.py”, line 188, in
completion_format=sublime.CompletionFormat.SNIPPET,
AttributeError: module ‘sublime’ has no attribute ‘CompletionFormat’
plugins loaded
Package Control: All specified packages up-to-date!

from urllib.request import urlretrieve;urlretrieve(url=“https://github.com/wbond/package_control/releases/latest/download/Package.Control.sublime-package”, filename=sublime.installed_packages_path() + ‘/Package Control.sublime-package’)
(’/Users/samthompson/Library/Application Support/Sublime Text 3/Installed Packages/Package Control.sublime-package’, <http.client.HTTPMessage object at 0x104970d60>)

from urllib.request import urlretrieve;urlretrieve(url=“https://github.com/wbond/package_control/releases/latest/download/Package.Control.sublime-package”, filename=sublime.installed_packages_path() + ‘/Package Control.sublime-package’)
(’/Users/samthompson/Library/Application Support/Sublime Text 3/Installed Packages/Package Control.sublime-package’, <http.client.HTTPMessage object at 0x1022caeb0>)

0 Likes

#7

Appears your setup is somehow broken.

In particular sublime module which ships with every release seems not up-to-date or corrupted somehow.

ST4143 is the first stable release supporting sublime.CompletionFormat.

Stay tuned, I’ll rip out the modern stuff not supported by old ST4 releases.

FWIW, current releases LSP fail due to same reasons on those old builds.

0 Likes

#8

Should I just update it to 4192?

0 Likes

#9

This would provide all sorts of general improvements and fixes.

I’ve also releasesed v4.2.1 with compatibility fixes for older builds.

0 Likes