Skip to content

"'NoneType' object is not iterable" when there are no stakes to list #1025

@fjarri

Description

@fjarri

Seen in: commit 52420e0 (current hawksbeard branch)

When there are no stakes yet, nucypher ursula stake --list produces the following error:

Enter keyring password: 
Decrypting NuCypher keyring...
Decrypting Ethereum Node Keyring...
No default teacher nodes exist for the specified network: b"b'goerli'"
WARNING - No Bootnodes Available
There are no existing stakes for 0xbE5A5646Ea2B6d47ea65dF2a13A1876997a348c4
| # | Duration     | Enact       | Expiration | Value 
| - | ------------ | ----------- | -----------| ----- 
Traceback (most recent call last):
  File "/home/ubuntu/.local/share/virtualenvs/nucypher-fvStivKV/bin/nucypher", line 11, in <module>
    load_entry_point('nucypher', 'console_scripts', 'nucypher')()
  File "/home/ubuntu/.local/share/virtualenvs/nucypher-fvStivKV/lib/python3.7/site-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/home/ubuntu/.local/share/virtualenvs/nucypher-fvStivKV/lib/python3.7/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/home/ubuntu/.local/share/virtualenvs/nucypher-fvStivKV/lib/python3.7/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/ubuntu/.local/share/virtualenvs/nucypher-fvStivKV/lib/python3.7/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/ubuntu/.local/share/virtualenvs/nucypher-fvStivKV/lib/python3.7/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/home/ubuntu/.local/share/virtualenvs/nucypher-fvStivKV/lib/python3.7/site-packages/click/decorators.py", line 64, in new_func
    return ctx.invoke(f, obj, *args, **kwargs)
  File "/home/ubuntu/.local/share/virtualenvs/nucypher-fvStivKV/lib/python3.7/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/home/ubuntu/nucypher/nucypher/cli/characters/ursula.py", line 405, in ursula
    painting.paint_stakes(stakes=URSULA.stakes)
  File "/home/ubuntu/nucypher/nucypher/cli/painting.py", line 263, in paint_stakes
    for index, stake in enumerate(stakes):
  File "/home/ubuntu/.local/share/virtualenvs/nucypher-fvStivKV/lib/python3.7/site-packages/constant_sorrow/constants.py", line 162, in __iter__
    for item in self.__repr_content:
TypeError: 'NoneType' object is not iterable

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bug 🐛Broken functionalityCLIThis effects the nucypher CLIux designUser experience enhancements

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions