Skip to content
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

No such file or directory: 'kpsewhich' #36

Open
ghost opened this issue Aug 7, 2022 · 2 comments
Open

No such file or directory: 'kpsewhich' #36

ghost opened this issue Aug 7, 2022 · 2 comments

Comments

@ghost
Copy link

ghost commented Aug 7, 2022

When trying to open a pdf, I get this error:

Traceback (most recent call last):
  File "/home/huoknight/.local/lib/python3.10/site-packages/pybtex/io.py", line 83, in _open
    return _open_existing(opener, filename, mode, locate=kpsewhich, **kwargs)
  File "/home/huoknight/.local/lib/python3.10/site-packages/pybtex/io.py", line 54, in _open_existing
    found = locate(filename)
  File "/home/huoknight/.local/lib/python3.10/site-packages/pybtex/kpathsea.py", line 28, in kpsewhich
    p = Popen(['kpsewhich', filename], stdout=PIPE, stderr=PIPE)
  File "/usr/lib/python3.10/subprocess.py", line 966, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.10/subprocess.py", line 1842, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'kpsewhich'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/huoknight/.local/bin/termpdf.py", line 1859, in <module>
    main()
  File "/home/huoknight/.local/bin/termpdf.py", line 1830, in main
    doc.citekey = citekey_from_path(doc.filename)
  File "/home/huoknight/.local/bin/termpdf.py", line 1142, in citekey_from_path
    bib = bib_from_field('File',path)
  File "/home/huoknight/.local/bin/termpdf.py", line 1128, in bib_from_field
    bib = parse_file(config.BIBTEX,'bibtex')
  File "/home/huoknight/.local/lib/python3.10/site-packages/pybtex/database/__init__.py", line 928, in parse_file
    return parser.parse_file(file)
  File "/home/huoknight/.local/lib/python3.10/site-packages/pybtex/database/input/__init__.py", line 52, in parse_file
    with open_file(filename, encoding=self.encoding) as f:
  File "/home/huoknight/.local/lib/python3.10/site-packages/pybtex/io.py", line 95, in open_unicode
    return _open(io.open, filename, mode, encoding=encoding)
  File "/home/huoknight/.local/lib/python3.10/site-packages/pybtex/io.py", line 85, in _open
    raise PybtexError("unable to open %s. %s" % (filename, error.strerror))
pybtex.exceptions.PybtexError: unable to open . No such file or directory

I have installed all the requirements as shown in the README. This is on Linux Mint 21.

@claziss
Copy link

claziss commented Nov 10, 2022

It looks very similar with issue #15 . I had a similar issue on my Fedora and I fix it by installing texlive.

@thedrint
Copy link

thedrint commented Feb 4, 2024

For me on Ubuntu installing of sudo apt install bibtool was help.

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

No branches or pull requests

2 participants