Skip to content

Handle AccountDoesNotExistsException on worker init #757

@bitphage

Description

@bitphage

Reported on telegram. Dexbot was used with OL node and it was in some error state, so it failed to return account data on Account(self.worker["account"], full=True, bitshares_instance=self.bitshares).

Suggestion is to try to reconnect to another node before giving up.

Traceback (most recent call last):
  File "/opt/DEXBot/dexbot/worker.py", line 74, in init_workers
    config=config, name=worker_name, bitshares_instance=self.bitshares, view=self.view
  File "/opt/DEXBot/dexbot/strategies/staggered_orders.py", line 26, in init
    super().init(*args, **kwargs)
  File "/opt/DEXBot/dexbot/strategies/base.py", line 153, in init
    self._account = Account(self.worker["account"], full=True, bitshares_instance=self.bitshares)
  File "/usr/local/lib/python3.6/dist-packages/graphenecommon/instance.py", line 36, in init
    cls.init(self, *args, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/graphenecommon/account.py", line 49, in init
    BlockchainObject.init(self, *args, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/graphenecommon/blockchainobject.py", line 270, in init
    self.refresh()
  File "/usr/local/lib/python3.6/dist-packages/graphenecommon/account.py", line 61, in refresh
    raise AccountDoesNotExistsException(self.identifier)
graphenecommon.exceptions.AccountDoesNotExistsException

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions