nyx icon indicating copy to clipboard operation
nyx copied to clipboard

AttributeError: module 'stem.util.log' has no attribute 'LogBuffer'

Open dgoulet-tor opened this issue 4 years ago • 5 comments

Latest git master of both Stem and Nyx gives me this error:

Traceback (most recent call last):
  File "/usr/local/bin/nyx", line 11, in <module>
    load_entry_point('nyx==2.1.0.dev0', 'console_scripts', 'nyx')()
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 480, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2693, in load_entry_point
    return ep.load()
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2324, in load
    return self.resolve()
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2330, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/usr/local/lib/python3.6/dist-packages/nyx-2.1.0.dev0-py3.6.egg/nyx/__init__.py", line 779, in <module>
    import nyx.panel.log
  File "/usr/local/lib/python3.6/dist-packages/nyx-2.1.0.dev0-py3.6.egg/nyx/panel/log.py", line 69, in <module>
    NYX_LOGGER = log.LogBuffer(log.Runlevel.DEBUG, yield_records = True)
AttributeError: module 'stem.util.log' has no attribute 'LogBuffer'

Stem: d1174a83c2dcb7b855d8fc986be3ab8f8d88d68c Nyx: 796089d28debb1c4f6d4ee645214e3fc61068a12

dgoulet-tor avatar Apr 28 '20 13:04 dgoulet-tor

Thanks David! Stem 2.x breaks backward compatibility in several ways so Nyx is not expected to work with the git codebase. Once we have a Stem release I'll update Nyx to use the new codebase.

In the meantime please run Nyx with Stem 1.8.

atagar avatar Apr 28 '20 23:04 atagar

Hi @atagar,

In the meantime, can you change nyx's requirements to include stem < 2 ? https://github.com/torproject/nyx/blob/master/setup.py#L82

teor2345 avatar Apr 29 '20 01:04 teor2345

Good point teor, can do. That said, it don't make a meaningful impact (that governs pip behavior, there there won't be a stem 2.0 release before nyx's codebase supports it).

atagar avatar Apr 29 '20 01:04 atagar

Is it possible to produce a more meaningful error message in nyx?

(That could be hard, because the error happens at import time.)

teor2345 avatar Apr 29 '20 01:04 teor2345

That's a great idea. When we add Stem 2.x compatibility I'll add a message when we have a version mismatch (since we'll lose 1.x support).

atagar avatar Apr 29 '20 01:04 atagar