question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

__init__() takes exactly 6 arguments (2 given)

See original GitHub issue

Hello. Just installed this today. Had to upgrade my numpy to latest version to fix a previous error. After about 10-20minutes, I got this error.

Welcome to Poloniex Lending Bot
Started WebServer, lendingbot status available at http://10.10.10.202:8000/lendingbot.html
2017-01-11 15:29:16 Error: __init__() takes exactly 6 arguments (2 given)
Traceback (most recent call last):
  File "lendingbot.py", line 68, in <module>
    Lending.cancel_all()
  File "/usr/src/poloniexlendingbot/modules/Lending.py", line 100, in cancel_all
    loan_offers = api.return_open_loan_offers()
  File "/usr/src/poloniexlendingbot/modules/Poloniex.py", line 129, in return_open_loan_offers
    loan_offers = self.api_query('returnOpenLoanOffers')
  File "/usr/src/poloniexlendingbot/modules/Poloniex.py", line 86, in api_query
    raise type(ex), type(ex)(ex.message + ' Requesting %s' % command), sys.exc_info()[2]
TypeError: __init__() takes exactly 6 arguments (2 given)

Unhandled error, please open a Github issue so we can fix it!

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
laxdogcommented, Feb 8, 2017

@rnevet Since you already have the exception, instead of raising a new one, you could:

ex.message = "{0} Requesting {1}".format(str(ex), command)
raise

Then change all the str(ex) in lendingbot.py to ex.message.

message will always exist for python Exceptions and you’d be creating it for any random ones that are caught that somehow might not have it. Though they always should.

Or of course, just ignore the original type and raise a new one.

1reaction
utdrmaccommented, Jan 11, 2017

Seems to be running otherwise.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Python: TypeError: __init__() takes exactly 2 arguments (1 ...
The code you used is as follows: player = Player(). This is an issue since the __init__ must be supplied by one parameter...
Read more >
How to solve "TypeError: __init__() takes exactly 2 arguments ...
"Takes exactly 2 arguments" means self , which is automatically supplied, +1 other user-specified argument. This is because RemapRange is a ...
Read more >
TypeError: __init__() takes exactly 1 argument (2 given)
Getting the error on the line where I try to create the milton instance: class Employee(object): “””Models real-life employees!””” def init(self ...
Read more >
TypeError: init() takes exactly 5 arguments (2 given) - Odoo
Server Traceback (most recent call last): File "/home/openerp/openerp/7.0/openerp7/openerp/addons/web/session.py", line 90, in send return ...
Read more >
Python TypeError: init takes exactly 1 argument 2 given
Python TypeError: init takes exactly 1 argument 2 given. 13K views 7 years ago. ATOM. ATOM. 6.38K subscribers. Subscribe.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found