TypeError: __init__() takes exactly 4 arguments (5 given)

Asked by Ralf Reddin on 2013-11-25

when running "rubber -m dvipdfm test.tex" I got this error:

Traceback (most recent call last):
  File "/usr/local/bin/rubber", line 4, in <module>
    sys.exit(Main()(sys.argv[1:]))
  File "/usr/local/lib/python2.7/dist-packages/rubber/cmdline.py", line 319, in __call__
    return self.main(cmdline)
  File "/usr/local/lib/python2.7/dist-packages/rubber/cmdline.py", line 244, in main
    env.main.command(cmd[0], cmd[1:], {'file': 'command line'})
  File "/usr/local/lib/python2.7/dist-packages/rubber/converters/latex.py", line 830, in command
    getattr(self, "do_" + cmd)(*args)
  File "/usr/local/lib/python2.7/dist-packages/rubber/converters/latex.py", line 869, in do_module
    self.modules.register(mod, dict)
  File "/usr/local/lib/python2.7/dist-packages/rubber/converters/latex.py", line 77, in register
    mod = PyModule(self.env, pymodule, dict)
  File "/usr/local/lib/python2.7/dist-packages/rubber/converters/latex.py", line 1494, in __init__
    pymodule.setup(document, context)
  File "/usr/local/lib/python2.7/dist-packages/rubber/latex_modules/dvipdfm.py", line 40, in setup
    dep = Dep(doc, pdf, dvi, doc.env.final)
TypeError: __init__() takes exactly 4 arguments (5 given)

It seems in depended of the TeX file to process. Doing things manual (latex…, dvipdfmx ….) works fine. What does the error mean? What to do?

I'm using Ubuntu 13.10 Saucy Salamander and Rubber version: 1.1

Question information

Language:
English Edit question
Status:
Solved
For:
Rubber Edit question
Assignee:
No assignee Edit question
Solved by:
Ralf Reddin
Solved:
2013-11-26
Last query:
2013-11-26
Last reply:
Ralf Reddin (ralf-reddin) said : #1

I changed in /usr/local/lib/python2.7/dist-packages/rubber/latex_modules/dvipdfm.py

the line

dep = Dep(doc, pdf, dvi, doc.env.final)

to

dep = Dep(doc, pdf, dvi)

and got it run, but I don't understand python, so I have no clue what I did. Copied the line from /usr/local/lib/python2.7/dist-packages/rubber/latex_modules/dvips.py as "-m dvips" works fine.