Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR:root:task crashed NameError: name 'electrum' is not defined #684

Closed
Folkaio opened this issue Jan 10, 2019 · 2 comments

Comments

@Folkaio
Copy link

commented Jan 10, 2019

Hello,

I was getting the error ERROR:root:task crashed after updating from version 1.8.12 to 1.9.0.

It seems to be fixed after replacing this line :
self.hsub_results = (electrum, {'hex': raw.hex(), 'height': height})
by
self.hsub_results = (electrumx, {'hex': raw.hex(), 'height': height})

in the file /usr/local/lib/python3.6/dist-packages/electrumx/server/session.py

ERROR output

electrumx_server[31820]: ERROR:root:task crashed: <Task finished coro=<Controller.serve() done, defined at /usr/local/lib/python3.6/dist-packages/electrumx/server/controller.py:81> exception=NameError("name 'electrum' is not defined",)>
electrumx_server[31820]: Traceback (most recent call last):
electrumx_server[31820]: File "/usr/local/lib/python3.6/dist-packages/aiorpcx/util.py", line 118, in check_task
electrumx_server[31820]: task.result()
electrumx_server[31820]: File "/usr/local/lib/python3.6/dist-packages/electrumx/server/controller.py", line 134, in serve
electrumx_server[31820]: await group.spawn(wait_for_catchup())
electrumx_server[31820]: File "/usr/local/lib/python3.6/dist-packages/aiorpcx/curio.py", line 231, in aexit
electrumx_server[31820]: await self.join()
electrumx_server[31820]: File "/usr/local/lib/python3.6/dist-packages/aiorpcx/curio.py", line 200, in join
electrumx_server[31820]: raise task.exception()
electrumx_server[31820]: File "/usr/local/lib/python3.6/dist-packages/electrumx/server/session.py", line 498, in serve
electrumx_server[31820]: await notifications.start(self.db.db_height, self._notify_sessions)
electrumx_server[31820]: File "/usr/local/lib/python3.6/dist-packages/electrumx/server/controller.py", line 63, in start
electrumx_server[31820]: await self.notify(height, set())
electrumx_server[31820]: File "/usr/local/lib/python3.6/dist-packages/electrumx/server/session.py", line 554, in _notify_sessions
electrumx_server[31820]: await self._refresh_hsub_results(height)
electrumx_server[31820]: File "/usr/local/lib/python3.6/dist-packages/electrumx/server/session.py", line 345, in _refresh_hsub_results
electrumx_server[31820]: self.hsub_results = (electrum, {'hex': raw.hex(), 'height': height})
electrumx_server[31820]: NameError: name 'electrum' is not defined

Rgds,

@romanornr

This comment has been minimized.

Copy link
Contributor

commented Jan 10, 2019

Same issue here

INFO:SessionManager:max session count: 1,000
INFO:SessionManager:session timeout: 600 seconds
INFO:SessionManager:session bandwidth limit 2,000,000 bytes
INFO:SessionManager:max response size 1,000,000 bytes
INFO:SessionManager:max subscriptions across all sessions: 250,000
INFO:SessionManager:max subscriptions per session: 50,000
INFO:MemPool:synced in 259.72s
INFO:MemPool:compact fee histogram: []
INFO:MemPool:0 txs touching 0 addresses
INFO:BlockProcessor:flushing to DB for a clean shutdown...
ERROR:root:task crashed: <Task finished coro=<Controller.serve() done, defined at /electrumx/electrumx/server/controller.py:81> exception=NameError("name 'electrum' is not defined")>
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/aiorpcX-0.10.2-py3.7.egg/aiorpcx/util.py", line 118, in check_task
    task.result()
  File "/electrumx/electrumx/server/controller.py", line 134, in serve
    await group.spawn(wait_for_catchup())
  File "/usr/local/lib/python3.7/site-packages/aiorpcX-0.10.2-py3.7.egg/aiorpcx/curio.py", line 231, in __aexit__
    await self.join()
  File "/usr/local/lib/python3.7/site-packages/aiorpcX-0.10.2-py3.7.egg/aiorpcx/curio.py", line 200, in join
    raise task.exception()
  File "/electrumx/electrumx/server/session.py", line 498, in serve
    await notifications.start(self.db.db_height, self._notify_sessions)
  File "/electrumx/electrumx/server/controller.py", line 63, in start
    await self.notify(height, set())
  File "/electrumx/electrumx/server/session.py", line 554, in _notify_sessions
    await self._refresh_hsub_results(height)
  File "/electrumx/electrumx/server/session.py", line 345, in _refresh_hsub_results
    self.hsub_results = (electrum, {'hex': raw.hex(), 'height': height})
NameError: name 'electrum' is not defined
@savyp

This comment has been minimized.

Copy link

commented Jan 11, 2019

same here:

INFO:Controller:Python version: 3.7.1 (default, Oct 24 2018, 14:34:27) 
[GCC 8.2.0]
INFO:Controller:software version: ElectrumX 1.9.0
INFO:Controller:aiorpcX version: 0.10.1
INFO:Controller:supported protocol versions: 1.4-1.4
INFO:Controller:event loop policy: None
INFO:Controller:reorg limit is 200 blocks
INFO:Daemon:daemon #1 at localhost:8332/ (current)
INFO:Daemon:daemon #2 at xxx.xxx.xxx.xxx:8332/
INFO:DB:switching current directory to /home/bitcoin/.electrumx/electrumx-rocksdb-database/
INFO:DB:using rocksdb for DB backend
INFO:DB:opened UTXO DB (for sync: True)
INFO:DB:DB version: 6
INFO:DB:coin: BitcoinSegwit
INFO:DB:network: mainnet
INFO:DB:height: 558,033
INFO:DB:tip: 000000000000000000012c03125844d47474713084e2ea891b407a84f03c8fef
INFO:DB:tx count: 372,160,893
INFO:DB:flushing DB cache at 2,000 MB
INFO:History:history DB version: 0
INFO:History:flush count: 271
INFO:SessionManager:RPC server listening on 127.0.0.1:8000
INFO:Prefetcher:catching up to daemon height 558,035 (2 blocks behind)
INFO:BlockProcessor:our height: 558,035 daemon: 558,035 UTXOs 4MB hist 4MB
INFO:BlockProcessor:processed 2 blocks in 64.8s
INFO:BlockProcessor:caught up to height 558035
INFO:DB:flushed filesystem data in 0.00s
INFO:History:flushed history in 0.1s for 24,628 addrs
INFO:DB:flushed 2 blocks with 4,752 txs, 13,541 UTXO adds, 13,173 spends in 0.1s, committing...
INFO:DB:flush #272 took 0.3s.  Height 558,035 txs: 372,165,645 (+4,752)
INFO:DB:tx/sec since genesis: 64, since last flush: 70
INFO:DB:sync time: 66d 08h 24m  ETA: 00s
INFO:DB:closing DBs to re-open for serving
INFO:DB:opened UTXO DB (for sync: False)
INFO:DB:DB version: 6
INFO:DB:coin: BitcoinSegwit
INFO:DB:network: mainnet
INFO:DB:height: 558,035
INFO:DB:tip: 00000000000000000018dc91c0f1c84b0352a93a5eabf9e36b72f2b0001579b0
INFO:DB:tx count: 372,165,645
INFO:History:history DB version: 0
INFO:History:flush count: 272
INFO:DB:deleted 2 stale undo entries
INFO:DB:populating header merkle cache...
INFO:MemPool:beginning processing of daemon mempool.  This can take some time...
INFO:DB:header merkle cache populated in 8.7s
INFO:SessionManager:max session count: 1,000
INFO:SessionManager:session timeout: 600 seconds
INFO:SessionManager:session bandwidth limit 2,000,000 bytes
INFO:SessionManager:max response size 1,000,000 bytes
INFO:SessionManager:max subscriptions across all sessions: 250,000
INFO:SessionManager:max subscriptions per session: 50,000
INFO:MemPool:synced in 60.87s
INFO:MemPool:compact fee histogram: [(14, 104154), (10, 208712), (9, 55440), (7, 159808), (6, 314839), (5, 77206), (4, 68334), (3, 414328), (2, 912777), (1, 498031)]
INFO:MemPool:6,590 txs touching 17,305 addresses
INFO:SessionManager:closing down RPC listening servers
INFO:BlockProcessor:flushing to DB for a clean shutdown...
ERROR:root:task crashed: <Task finished coro=<Controller.serve() done, defined at /home/bitcoin/electrumx/electrumx/server/controller.py:81> exception=NameError("name 'electrum' is not defined")>
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/aiorpcX-0.10.1-py3.7.egg/aiorpcx/util.py", line 118, in check_task
    task.result()
  File "/home/bitcoin/electrumx/electrumx/server/controller.py", line 134, in serve
    await group.spawn(wait_for_catchup())
  File "/usr/local/lib/python3.7/dist-packages/aiorpcX-0.10.1-py3.7.egg/aiorpcx/curio.py", line 242, in __aexit__
    await self.join(wait=self._wait)
  File "/usr/local/lib/python3.7/dist-packages/aiorpcX-0.10.1-py3.7.egg/aiorpcx/curio.py", line 213, in join
    raise task.exception()
  File "/home/bitcoin/electrumx/electrumx/server/session.py", line 498, in serve
    await notifications.start(self.db.db_height, self._notify_sessions)
  File "/home/bitcoin/electrumx/electrumx/server/controller.py", line 63, in start
    await self.notify(height, set())
  File "/home/bitcoin/electrumx/electrumx/server/session.py", line 554, in _notify_sessions
    await self._refresh_hsub_results(height)
  File "/home/bitcoin/electrumx/electrumx/server/session.py", line 345, in _refresh_hsub_results
    self.hsub_results = (electrum, {'hex': raw.hex(), 'height': height})
NameError: name 'electrum' is not defined
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.