Skip to content

Conversation

@alberti42
Copy link
Contributor

@alberti42 alberti42 commented Aug 23, 2025

Summary

Opening PDFs with the Skim viewer crashed with:

TypeError: expected string or bytes-like object
  at shlex.quote(...)
  at latextools/utils/external_command.py

Root cause: plugins/viewer/skim_viewer.py passed a pathlib.Path (script_file) in the command list to external_command(). That function later quotes each arg with shlex.quote(), which requires str/bytes.

Change

Cast script_file to str when building the command:

- command = ["/bin/sh", script_file, "-r"]
+ command = ["/bin/sh", str(script_file), "-r"]

…PosixPath of pathlib. Instead, a path of type string must be provided here.
@deathaxe
Copy link
Member

Thanks!

@deathaxe deathaxe merged commit 85db426 into SublimeText:master Aug 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants