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

[Docs] EventLoggerPlugin no longer exists #396

Closed
michaelbutler opened this issue Aug 5, 2020 · 2 comments
Closed

[Docs] EventLoggerPlugin no longer exists #396

michaelbutler opened this issue Aug 5, 2020 · 2 comments

Comments

@michaelbutler
Copy link

Hi there! I was going through to get a basic hello world running with this bot and got an error:

Initializing Slack Machine:
    Loading settings...
[2020-08-05 18:30:41][DEBUG] asyncio selector_events.py:__init__:58 | Using selector: KqueueSelector
    Initializing storage using backend: machine.storage.backends.memory.MemoryStorage
[2020-08-05 18:30:41][DEBUG] machine.core core.py:__init__:62 | Storage initialized!
    Loading plugins...
[2020-08-05 18:30:41][DEBUG] machine.core core.py:load_plugins:79 | PLUGINS: ['machine.plugins.builtin.general.HelloPlugin', 'machine.plugins.builtin.debug.EventLoggerPlugin']
[2020-08-05 18:30:41][DEBUG] machine.core core.py:load_plugins:83 | Found a Machine plugin: machine.plugins.builtin.general.HelloPlugin
        ✓ machine.plugins.builtin.general:HelloPlugin
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/machine/utils/module_loading.py", line 15, in import_string
    module = import_module(dotted_path)
  File "/usr/local/Cellar/python/3.7.7/Frameworks/Python.framework/Versions/3.7/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 962, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'machine.plugins.builtin.debug.EventLoggerPlugin'; 'machine.plugins.builtin.debug' is not a package

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/machine/utils/module_loading.py", line 22, in import_string
    return [("{}:{}".format(module_path, class_name), getattr(module, class_name))]
AttributeError: module 'machine.plugins.builtin.debug' has no attribute 'EventLoggerPlugin'

The most relevant line of the above is

ModuleNotFoundError: No module named 'machine.plugins.builtin.debug.EventLoggerPlugin';

I had my plugins list set to

PLUGINS = [
    # 'machine.plugins.builtin.general.PingPongPlugin',
    'machine.plugins.builtin.general.HelloPlugin',
    'machine.plugins.builtin.debug.EventLoggerPlugin',
    # 'machine.plugins.builtin.debug.EchoPlugin'
]

Likely the docs simply need to be updated where this is referenced as a possible Plugin. It looks like this was removed in a recent version, maybe 19 or 20 but I see it existed back here. I would update myself but I'm actually not sure at the moment what the replacement for EventLoggerPlugin is, or what it did. Perhaps it isn't needed because if we set the LOGLEVEL to "DEBUG" it will do the same thing that that Plugin did?

@michaelbutler
Copy link
Author

michaelbutler commented Aug 5, 2020

Here is the reference to the doc where EventLoggerPlugin is (still) referenced: https://github.com/DandyDev/slack-machine/blob/c5255f46367cd4a5f720e351a0a983dcee2844e3/docs/user/usage.rst#L85

@DonDebonair
Copy link
Owner

Thanks for noticing! I will fix that asap.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants