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

Asked by Ralf Reddin

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>
  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

English Edit question
Rubber Edit question
No assignee Edit question
Solved by:
Ralf Reddin
Last query:
Last reply:
Revision history for this message
Ralf Reddin (ralf-reddin) said :

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)


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.