[tahoe-lafs-trac-stream] [Tahoe-LAFS] #2817: unicode error in _got_announcement at startup

Tahoe-LAFS trac at tahoe-lafs.org
Thu Sep 1 21:17:31 UTC 2016


#2817: unicode error in _got_announcement at startup
--------------------------+------------------------
 Reporter:  warner        |          Owner:
     Type:  defect        |         Status:  new
 Priority:  major         |      Milestone:  1.12.0
Component:  code-network  |        Version:  1.11.0
 Keywords:                |  Launchpad Bug:
--------------------------+------------------------
 user "Vladislav" on the mailing list reported an exception when starting a
 node with an I2P-based client:

 {{{
 >  File "/home/vlad/.virtualenvs/tahoe/local/lib/python2.7/site-
 packages/foolscap/eventual.py",
 > line 26, in _turn
 >    cb(*args, **kwargs)
 >  File "/home/vlad/tahoe-lafs/src/allmydata/storage_client.py", line 144,
 in _got_announcement
 >    precondition(isinstance(key_s, str), key_s)
 >  File "/home/vlad/tahoe-lafs/src/allmydata/util/assertutil.py", line 39,
 in precondition
 >    raise AssertionError, "".join(msgbuf)
 > exceptions.AssertionError: precondition:
 u'v0-myl4clrthvchbjn77vkojeadtaprngcubxuyjxcfimyb6irvdola' <type
 'unicode'>
 }}}

 This looks like we're feeding a unicode `key_s` server-identifier into a
 function that really wants a string. There are two pathways into
 `_got_announcement()`: one is when the !IntroducerClient receives a new
 announcement, the other is at startup when the !IntroducerClient is
 reading the `introducer_cache.yaml` entries and delivering them as if they
 were real-time announcements.

 I suspect that this is the second case, and we're missing code to string-
 ify the server-id values on the way in.

--
Ticket URL: <https://tahoe-lafs.org/trac/tahoe-lafs/ticket/2817>
Tahoe-LAFS <https://Tahoe-LAFS.org>
secure decentralized storage


More information about the tahoe-lafs-trac-stream mailing list