TypeError: __init__() takes exactly 2 arguments (1 given)

Bug #343505 reported by Erik Hetzner
4
Affects Status Importance Assigned to Milestone
BookLiberator
New
Undecided
Unassigned

Bug Description

egh@pissarro:~/software/bkrpr$ ./bkrpr.py -cr --180 'test/*.JPG'
Traceback (most recent call last):
  File "./bkrpr.py", line 271, in <module>
    main()
  File "./bkrpr.py", line 258, in main
    bkrpr = cli.OcrGlob(opt)
  File "/home/egh/software/bkrpr/Bkrpr/cli.py", line 88, in __init__
    self.M = model.Model()
TypeError: __init__() takes exactly 2 arguments (1 given)

Thanks!

Revision history for this message
Karl Fogel (kfogel) wrote :

I can see what the problem is: in Bkrpr/cli.py, OcrGlob.__init__(), the initialization

   self.M = model.Model()

should be passing a path argument. Duh. But looking at the code, I'm not sure whether the right solution is to find an appropriate path to pass to Model() there, or to make Model()'s __init__() method not require a path in the first place. There are some signs that the latter might be the way to go.

Punting to James...

Revision history for this message
Karl Fogel (kfogel) wrote :

(Oh, and I can reproduce this, not that there was any real doubt on that score.)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.