eve-val/evelink

char/AccountBalance: AttributeError: 'module' object has no attribute 'get'

flexd opened this issue · 5 comments

Traceback (most recent call last):
  File "/home/kristoffer/.virtualenvs/eve/local/lib/python2.7/site-packages/flask/app.py", line 1817, in wsgi_app
    response = self.full_dispatch_request()
  File "/home/kristoffer/.virtualenvs/eve/local/lib/python2.7/site-packages/flask/app.py", line 1477, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/home/kristoffer/.virtualenvs/eve/local/lib/python2.7/site-packages/flask/app.py", line 1381, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/home/kristoffer/.virtualenvs/eve/local/lib/python2.7/site-packages/flask/app.py", line 1475, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/kristoffer/.virtualenvs/eve/local/lib/python2.7/site-packages/flask/app.py", line 1461, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "./eve/auth.py", line 43, in decorated_function
    return func(*args, **kwargs)
  File "./eve/views.py", line 740, in nav
    balance_response = char.wallet_balance()
  File "/home/kristoffer/.virtualenvs/eve/local/lib/python2.7/site-packages/evelink/char.py", line 98, in wallet_balance
    api_result = self.wallet_info()
  File "/home/kristoffer/.virtualenvs/eve/local/lib/python2.7/site-packages/evelink/api.py", line 473, in wrapper
    kw['api_result'] = client.api.get(self.path, params=params)
AttributeError: 'module' object has no attribute 'get'

It was working before, and now it is not, I have not made any changes.

INFO:evelink.api:Client: <evelink.char.Char object at 0x37b38d0>
INFO:evelink.api:Path: 'char/AccountBalance'
INFO:evelink.api:Params: {'characterID': APIResult(result=93014296, timestamp=1407061236
, expires=1409739636)}

Can you show me how you're constructing the Char object?

Uh, it turns out I had overwritten a variable eve_api somewhere, and apparently it only breaks on very special occasions. So I was passing the wrong api here

charid = eve.character_id_from_name(eve_character)
char = evelink.char.Char(char_id=charid, api=eve_api)
balance_response = char.wallet_balance()
print balance_response.result

Sorry :-D

I guess perhaps there could be a check to see if api is of the right instance, to prevent idiots like me breaking it :-)