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

Error while trying to import BaseEventEmitter from pyee #109

Open
4 of 9 tasks
pravarag opened this issue Sep 5, 2024 · 1 comment
Open
4 of 9 tasks

Error while trying to import BaseEventEmitter from pyee #109

pravarag opened this issue Sep 5, 2024 · 1 comment
Labels
bug M-T: A confirmed bug report. Issues are confirmed when the reproduction steps are documented
Milestone

Comments

@pravarag
Copy link

pravarag commented Sep 5, 2024

Description

I tried to run an app based on slackeventsapi locally and got the below error:

ImportError: cannot import name 'BaseEventEmitter' from 'pyee' (/home/main-user/work/py-virtual-envs/venv-slackbot/lib64/python3.12/site-packages/pyee/__init__.py). Did you mean: 'EventEmitter'?

Above line indicates to the call here
And when I checked in pyee documentation regarding BaseEventEmitter, it seems it has been deprecated as per this link

If I change the definition to below line in init.py to:

from pyee import EventEmitter as BaseEventEmitter

it works as expected.

What type of issue is this? (place an x in one of the [ ])

  • bug
  • enhancement (feature request)
  • question
  • documentation related
  • testing related
  • discussion

Requirements

  • I've read and understood the Contributing guidelines and have done my best effort to follow them.
  • I've read and agree to the Code of Conduct.
  • I've searched for any related issues and avoided creating a duplicate issue.

Bug Report

Filling out the following details about bugs will help us solve your issue sooner.

Reproducible in:

slackeventsapi version: 3.0.3
python version: 3.12
OS version(s): Fedora 40

Steps to reproduce:

Expected result:

What you expected to happen

No error

Actual result:

What actually happened

ImportError: cannot import name 'BaseEventEmitter' from 'pyee' (/home/main-user/work/py-virtual-envs/venv-slackbot/lib64/python3.12/site-packages/pyee/__init__.py). Did you mean: 'EventEmitter'?

Attachments:

Logs, screenshots, screencast, sample project, funny gif, etc.

@seratch seratch added this to the 3.0.4 milestone Sep 5, 2024
@seratch seratch added the bug M-T: A confirmed bug report. Issues are confirmed when the reproduction steps are documented label Sep 5, 2024
@seratch
Copy link
Member

seratch commented Sep 5, 2024

Hi @pravarag, thanks for reporting this. Indeed, this library is not compatible with pyee's latest major version 12.x.

#108 , which is included in v3.0.3, narrowed the supported pyee versions, but when you install pyee's latest version anyway, your situation can arise. The immediate suggestion is to use pyee 11.x, but this project may support 12+ in the future.

With that being said, there is no merit in continuing to use this library for Slack's Events API handling (please read this important notice). Please consider using bolt-python with its Flask adapter: https://github.com/slackapi/bolt-python/tree/main/examples/flask

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug M-T: A confirmed bug report. Issues are confirmed when the reproduction steps are documented
Projects
None yet
Development

No branches or pull requests

2 participants