Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 687004 - net-misc/electrum-3.3.6 - ImportError: cannot import name 'NetAddress'
Summary: net-misc/electrum-3.3.6 - ImportError: cannot import name 'NetAddress'
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Anthony Basile
URL:
Whiteboard:
Keywords:
Depends on: 688100 688294
Blocks:
  Show dependency tree
 
Reported: 2019-05-30 12:52 UTC by Francesco Turco
Modified: 2019-06-21 22:02 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
info.txt (info.txt,5.94 KB, text/plain)
2019-05-30 12:52 UTC, Francesco Turco
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Francesco Turco 2019-05-30 12:52:30 UTC
Created attachment 578102 [details]
info.txt

I can't start Electrum anymore due to the following error:

### BEGIN ERROR MESSAGE ###

Traceback (most recent call last):
  File "/usr/lib/python-exec/python3.6/electrum", line 79, in <module>
    from electrum.logging import get_logger, configure_logging
  File "/usr/lib64/python3.6/site-packages/electrum/__init__.py", line 3, in <module>
    from .wallet import Wallet
  File "/usr/lib64/python3.6/site-packages/electrum/wallet.py", line 56, in <module>
    from . import transaction, bitcoin, coinchooser, paymentrequest, ecc, bip32
  File "/usr/lib64/python3.6/site-packages/electrum/paymentrequest.py", line 46, in <module>
    from .network import Network
  File "/usr/lib64/python3.6/site-packages/electrum/network.py", line 54, in <module>
    from .interface import (Interface, serialize_server, deserialize_server,
  File "/usr/lib64/python3.6/site-packages/electrum/interface.py", line 38, in <module>
    from aiorpcx import RPCSession, Notification, NetAddress
ImportError: cannot import name 'NetAddress'

### END ERROR MESSAGE ###

Some more info:

$ emerge -pv electrum aiorpcX 

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R    ] dev-python/aiorpcX-0.10.2::gentoo  PYTHON_TARGETS="python3_6" 0 KiB
[ebuild   R    ] net-misc/electrum-3.3.6::gentoo  USE="cli ncurses qt5 -audio_modem -coldcard -cosign -digitalbitbox -email -greenaddress_it -qrcode -revealer -safe_t -sync -trustedcoin_com -vkb" L10N="-ar -be -bg -cs -da -de -el -eo -es -fa -fr -hu -hy -id -it -ja -ko -ky -lv -nb -nl -pl -pt-BR -pt-PT -ro -ru -sk -sl -sv -ta -th -tr -uk -vi -zh-CN -zh-TW" PYTHON_TARGETS="python3_6" 0 KiB

Total: 2 packages (2 reinstalls), Size of downloads: 0 KiB
Comment 1 zasire 2019-05-31 23:06:51 UTC
Can confirm. Having the same error.
Comment 2 Michael Hampicke 2019-06-09 20:05:17 UTC
I'm having the same problem.

Seems like that NetAddress was added (1) in version 0.17 of dev-python/aiorpcX. Current ebuild in the tree is 0.10.2


1: https://github.com/kyuupichan/aiorpcX/commit/d86913737fc09e7f61800de5fa53d66195451a4c#diff-b21c25c15b1805bef88588b55ce0586b
Comment 3 Martin Dummer 2019-06-15 11:19:47 UTC
I can confirm this error.

So this ebuild has a missing dependency

RDEPEND= .... >=dev-python/aiorpcX-0.17

Please fix that. I will file a version bump request for dev-python/aiorpcX.

Question: how is it possible for the maintainer NOT to detect this problem while publishing this ebuild?
Comment 4 Anthony Basile gentoo-dev 2019-06-17 13:16:12 UTC
Okay this is fixed.   For users of this package, please test and let me know if there are any other issues.  If not, can someone open a stabilization bug for 3.3.6 in about a week and we'll get the latest version stable.
Comment 5 Martin Dummer 2019-06-17 15:30:22 UTC
Yes I will do.
Comment 6 Martin Dummer 2019-06-18 12:19:13 UTC
Unfortunately net-misc/electrum-3.3.6 is now starting, but does not connect to network services.

console messages are now:

martin@bln9716n ~ $ electrum 
E/i | interface.[elec.luggs.co:443] | Exception in wrapper_func: AttributeError("module 'aiorpcx' has no attribute 'Connector'",)
Traceback (most recent call last):
  File "/usr/lib64/python3.6/site-packages/electrum/util.py", line 908, in wrapper
    return await func(*args, **kwargs)
  File "/usr/lib64/python3.6/site-packages/electrum/interface.py", line 314, in wrapper_func
    return await func(self, *args, **kwargs)
  File "/usr/lib64/python3.6/site-packages/electrum/interface.py", line 334, in run
    await self.open_session(ssl_context)
  File "/usr/lib64/python3.6/site-packages/electrum/interface.py", line 420, in open_session
    async with aiorpcx.Connector(NotificationSession,
AttributeError: module 'aiorpcx' has no attribute 'Connector'

after some investigation and testing my solution is:

RDEPEND= ..
  =aiorpcX-0.17.0

because this is the only released version with "attribute Connector" and "Netadress"

Reference:
  https://github.com/kyuupichan/aiorpcX/blob/master/docs/changelog.rst

"Version 0.18.0 (09 May 2019)
    ...
    Unfortunately this required changing several APIs.
    ...
    The old Connector and Server classes are gone."

I will open a new bug for aiorpcX-0.17.0.
Comment 7 Martin Dummer 2019-06-18 12:30:02 UTC
Please reopen this bug.
Comment 8 Anthony Basile gentoo-dev 2019-06-18 21:36:16 UTC
(In reply to Martin Dummer from comment #6)

> 
> RDEPEND= ..
>   =aiorpcX-0.17.0
> 

Before I put 0.17.0 on the tree, can you confirm that you tested with that version and it worked?
Comment 9 Martin Dummer 2019-06-19 17:09:31 UTC
(In reply to Anthony Basile from comment #8)
> (In reply to Martin Dummer from comment #6)
> 
> > 
> > RDEPEND= ..
> >   =aiorpcX-0.17.0
> > 
> 
> Before I put 0.17.0 on the tree, can you confirm that you tested with that
> version and it worked?

Definitely yes, it works with aiorpcX-0.17.0. 

Didn't I write "after some investigation and testing" ???
Comment 10 Anthony Basile gentoo-dev 2019-06-20 20:17:36 UTC
(In reply to Martin Dummer from comment #9)
> (In reply to Anthony Basile from comment #8)
> > (In reply to Martin Dummer from comment #6)
> > 
> > > 
> > > RDEPEND= ..
> > >   =aiorpcX-0.17.0
> > > 
> > 
> > Before I put 0.17.0 on the tree, can you confirm that you tested with that
> > version and it worked?
> 
> Definitely yes, it works with aiorpcX-0.17.0. 
> 
> Didn't I write "after some investigation and testing" ???

okay this should be fixed now.  please reopen if it is still a problem.
Comment 11 Martin Dummer 2019-06-21 22:02:35 UTC
After

emerge -C dev-python/aiorpcX net-misc/electrum
emerge -av --depclean

emerge -v net-misc/electrum

the application work without error messages.

THX