Bug#798829: "OSError: [Errno 2] No such file or directory: ''" when running bibtex
Package: rubber Version: 1.2-1 Followup-For: Bug #798829 Dear Maintainer, I am still hitting a very similar bug each time I use bibtex inside my LaTeX document. It renders the software almost unusable when bibtex is in the loop (then, I do it by hand). Here is the full call-stack I get: $ rubber --pdf example.tex compiling example.tex... running BibTeX on example... Traceback (most recent call last): File "/usr/bin/rubber", line 4, in sys.exit(Main()(sys.argv[1:])) File "/usr/lib/python2.7/dist-packages/rubber/cmdline.py", line 331, in __call__ return self.main(cmdline) File "/usr/lib/python2.7/dist-packages/rubber/cmdline.py", line 295, in main ret = env.final.make(self.force) File "/usr/lib/python2.7/dist-packages/rubber/depend.py", line 166, in make ok = self.run() File "/usr/lib/python2.7/dist-packages/rubber/converters/latex.py", line 1310, in run if not self.post_compile(): File "/usr/lib/python2.7/dist-packages/rubber/converters/latex.py", line 1261, in post_compile if not mod.post_compile(): File "/usr/lib/python2.7/dist-packages/rubber/converters/latex.py", line 1526, in post_compile return self.pymodule.post_compile() File "/usr/lib/python2.7/dist-packages/rubber/latex_modules/bibtex.py", line 421, in post_compile return biblio.post_compile() File "/usr/lib/python2.7/dist-packages/rubber/latex_modules/bibtex.py", line 235, in post_compile return self.run() File "/usr/lib/python2.7/dist-packages/rubber/latex_modules/bibtex.py", line 258, in run if self.doc.env.execute(['bibtex', basename], doc, pwd=workdir): File "/usr/lib/python2.7/dist-packages/rubber/environment.py", line 226, in execute stderr = stderr) File "/usr/lib/python2.7/subprocess.py", line 710, in __init__ errread, errwrite) File "/usr/lib/python2.7/subprocess.py", line 1335, in _execute_child raise child_exception OSError: [Errno 2] No such file or directory: '' I see that this bug should be fixed in rubber version 1.3 which is currently out (see: https://launchpad.net/rubber). I tried it on my system and got it working nicely. -- System Information: Debian Release: stretch/sid APT prefers unstable APT policy: (500, 'unstable') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 4.2.3 (SMP w/4 CPU cores) Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) Versions of packages rubber depends on: ii python 2.7.9-1 pn python:any ii texlive-latex-base 2015.20151016-1 rubber recommends no packages. Versions of packages rubber suggests: ii imagemagick 8:6.8.9.9-6 pn sam2p ii transfig 1:3.2.5.e-4 -- no debconf information signature.asc Description: OpenPGP digital signature
Bug#798829: "OSError: [Errno 2] No such file or directory: ''" when running bibtex
Hi, this should be fixed in 1.3. It was one aspect of a lot of problems due to Rubber using abspath() all over the place. This is mostly gone now. @Hilmar: You can drop the Debian patch in the next release. Cheers Sebastian On Fri, Sep 25, 2015 at 12:42:19PM +0200, Pietro Battiston wrote: > Il giorno mer, 23/09/2015 alle 23.21 +0200, Pietro Battiston ha > scritto: > > [...] > > I also seem to be able to provide an explanation: patch > > rubber-1.2/src/latex_modules/bibtex.py > > > > Sorry, I meant patch > debian/patches/02_rubber_bibtext_20120807.diff > ... witch affects file > src/latex_modules/bibtex.py > > Pietro >
Bug#798829: "OSError: [Errno 2] No such file or directory: ''" when running bibtex
Il giorno mer, 23/09/2015 alle 23.21 +0200, Pietro Battiston ha scritto: > [...] > I also seem to be able to provide an explanation: patch > rubber-1.2/src/latex_modules/bibtex.py > Sorry, I meant patch debian/patches/02_rubber_bibtext_20120807.diff ... witch affects file src/latex_modules/bibtex.py Pietro
Bug#798829: "OSError: [Errno 2] No such file or directory: ''" when running bibtex
On 23.09.2015 23:07, Pietro Battiston wrote: Hi, > Here's a minimal example... but anything using bibtex fails for me, so > I'm afraid the bug is context-related... > I'm able to reproduce the problem here. > 3) open a terminal and type in one line: > rubber --inplace --maxerr -1 --short --force --warn all --pdf > radiation.tex > Minimal command line (for me): rubber --force radiation.tex Hilmar -- http://www.hilmar-preusse.de.vu/ #206401 http://counter.li.org
Bug#798829: "OSError: [Errno 2] No such file or directory: ''" when running bibtex
Il giorno mer, 23/09/2015 alle 22.36 +0200, Preuße, Hilmar ha scritto: > On 13.09.2015 13:02, Pietro Battiston wrote: > > Hi, > > > Since one of the last two updates, rubber is unable to compile a > > document of > > mine which previously it was perfectly able to: > > > We're failing to reproduce the problem. Could you provide a minimal > example to > reproduce it? Are we looking at a duplicate of #798991? > I also seem to be able to provide an explanation: patch rubber-1.2/src/latex_modules/bibtex.py it replaces biblio = Bibliography(doc, doc.target) with biblio = Bibliography(doc, basename(doc.target)) at line 410 or so. Now, the second argument becomes attribute "self.base" of the newly created Bibliography object (line 44). And here comes line 256 or so: workdir = os.path.dirname(self.base) which asks the workdir... of a filename, rather than a path! The patch doesn't give any detail on which bug it was fixing, so I don't know what should be done about it. Pietro
Bug#798829: "OSError: [Errno 2] No such file or directory: ''" when running bibtex
Il giorno mer, 23/09/2015 alle 22.36 +0200, Preuße, Hilmar ha scritto: > On 13.09.2015 13:02, Pietro Battiston wrote: > > Hi, > > > Since one of the last two updates, rubber is unable to compile a > > document of > > mine which previously it was perfectly able to: > > > We're failing to reproduce the problem. Could you provide a minimal > example to > reproduce it? Here's a minimal example... but anything using bibtex fails for me, so I'm afraid the bug is context-related... 1) put the following in a file ~/radiation.tex: \documentclass{article} \begin{document} test \cite{pietro} \bibliographystyle{plain} \bibliography{radiation.bib} \end{document} 2) put the following in a file ~/radiation.bib: @article{pietro, title={Shameless self-cite}, author={Pietro Battiston}, year={2014} } 3) open a terminal and type in one line: rubber --inplace --maxerr -1 --short --force --warn all --pdf radiation.tex You get the error above. Notice running pdflatex and bibtex manually wo rks fine. > Are we looking at a duplicate of #798991? Assuming the symptoms of #798991 are correctly reported, no: I don't have any symlink in my setup. Pietro
Bug#798829: "OSError: [Errno 2] No such file or directory: ''" when running bibtex
On 13.09.2015 13:02, Pietro Battiston wrote: Hi, > Since one of the last two updates, rubber is unable to compile a document of > mine which previously it was perfectly able to: > We're failing to reproduce the problem. Could you provide a minimal example to reproduce it? Are we looking at a duplicate of #798991? Hilmar -- http://www.hilmar-preusse.de.vu/ #206401 http://counter.li.org
Bug#798829: "OSError: [Errno 2] No such file or directory: ''" when running bibtex
Package: rubber Version: 1.2-1 Severity: important Tags: patch Since one of the last two updates, rubber is unable to compile a document of mine which previously it was perfectly able to: pietro@debiousci:~/radiation$ rubber --inplace --maxerr -1 --short --force --warn all --pdf radiation_04.tex compiling radiation_04.tex... running BibTeX on radiation_04... Traceback (most recent call last): File "/usr/bin/rubber", line 4, in sys.exit(Main()(sys.argv[1:])) File "/usr/lib/python2.7/dist-packages/rubber/cmdline.py", line 331, in __call__ return self.main(cmdline) File "/usr/lib/python2.7/dist-packages/rubber/cmdline.py", line 287, in main ret = env.main.make(True) File "/usr/lib/python2.7/dist-packages/rubber/depend.py", line 164, in make ok = self.force_run() File "/usr/lib/python2.7/dist-packages/rubber/converters/latex.py", line 1288, in force_run return self.run(True) File "/usr/lib/python2.7/dist-packages/rubber/converters/latex.py", line 1310, in run if not self.post_compile(): File "/usr/lib/python2.7/dist-packages/rubber/converters/latex.py", line 1261, in post_compile if not mod.post_compile(): File "/usr/lib/python2.7/dist-packages/rubber/converters/latex.py", line 1526, in post_compile return self.pymodule.post_compile() File "/usr/lib/python2.7/dist-packages/rubber/latex_modules/bibtex.py", line 421, in post_compile return biblio.post_compile() File "/usr/lib/python2.7/dist-packages/rubber/latex_modules/bibtex.py", line 235, in post_compile return self.run() File "/usr/lib/python2.7/dist-packages/rubber/latex_modules/bibtex.py", line 258, in run if self.doc.env.execute(['bibtex', basename], doc, pwd=workdir): File "/usr/lib/python2.7/dist-packages/rubber/environment.py", line 228, in execute stderr = stderr) File "/usr/lib/python2.7/subprocess.py", line 710, in __init__ errread, errwrite) File "/usr/lib/python2.7/subprocess.py", line 1335, in _execute_child raise child_exception OSError: [Errno 2] No such file or directory: '' The problem is that "execute()" in "environment.py" is receiving the empty string as "pwd" argument, and this in turn is due to "run()", in latex_modules/bibtex.py, calling "os.path.dirname" on a string which contains (at least in some cases) a filename rather than a full path. The problem is solved by replacing workdir = os.path.dirname (self.base) with workdir = os.path.dirname(os.path.realpath(self.base)) at line 256 of latex_modules/bibtex.py. I am farly confident this fix should not have undesired effects, what I ignore is whether it would better be implemented at some other level (i.e. if other modules than bibtex are affected by this bug). -- System Information: Debian Release: stretch/sid APT prefers testing APT policy: (650, 'testing'), (600, 'unstable'), (600, 'stable') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 4.1.0-1-amd64 (SMP w/2 CPU cores) Locale: LANG=it_IT.utf8, LC_CTYPE=it_IT.utf8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) Versions of packages rubber depends on: ii python 2.7.9-1 pn python:any ii texlive-latex-base 2015.20150823-1 rubber recommends no packages. Versions of packages rubber suggests: ii imagemagick 8:6.8.9.9-5 pn sam2p pn transfig -- no debconf information -- debsums errors found: debsums: changed file /usr/lib/python2.7/dist-packages/rubber/environment.py (from rubber package) debsums: changed file /usr/lib/python2.7/dist-packages/rubber/latex_modules/bibtex.py (from rubber package)