ValueError: Invalid mode ('rw')

Bug #1543622 reported by Denis Porfiryev on 2016-02-09
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

Python 2.7.11 x64, Windows 7 x64.

Tested Rubber versions:
- 1.4
- preview revision 20a56ec761ecaf7aa900d5a35b0fc017fdd07aed

python2 -c "import sys,os;execfile(os.path.join(sys.exec_prefix,'scripts','rubber'))" -f -m xelatex document.tex

Rubber fails with this error message (first several lines have been skipped as they don't play a role):

  File "C:\tools\python2\lib\site-packages\rubber\converters\", line 1311, in run
    if not self.compile():
  File "C:\tools\python2\lib\site-packages\rubber\converters\", line 1228, in compile
    self.env.execute(cmd, env, kpse=1)
  File "C:\tools\python2\lib\site-packages\rubber\", line 172, in execute
    stdin = devnull(),
  File "C:\tools\python2\lib\site-packages\rubber\", line 412, in devnull
    devnull_fp = open(os.devnull, 'rw')
  ValueError: Invalid mode ('rw')

After replacing 'rw' with 'r+' all works fine.

Sebastian Kapfer (caci) wrote :

Thanks, committed! Weirdly enough, Python2 on Linux accepts this mode. Python3 on Linux does not.

Changed in rubber:
status: New → Fix Committed
Changed in rubber:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers