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

AttributeError: module 'select' has no attribute 'epoll'. #31

Closed
pedrobuenoxs opened this issue Jun 2, 2023 · 2 comments
Closed

AttributeError: module 'select' has no attribute 'epoll'. #31

pedrobuenoxs opened this issue Jun 2, 2023 · 2 comments

Comments

@pedrobuenoxs
Copy link

``Hey, i'm not able to run chainlit on my computer.

I just grab the demo code:

import chainlit as cl


@cl.on_message  # this function will be called every time a user inputs a message in the UI
def main(message: str):
    # this is an intermediate step
    cl.Message(author="Tool 1", content=f"Response from tool1", indent=1).send()

    # send back the final answer
    cl.Message(content=f"This is the final answer").send()

And run:

❯ chainlit run demo.py -w 
2023-06-02 14:48:47 - Created default config file at /home/pedro/dev/freela/ai-langchain-chatgpt-bot/.chainlit/config.toml
Traceback (most recent call last):
  File "/home/pedro/.local/bin/chainlit", line 5, in <module>
    from chainlit.cli import cli
  File "/home/pedro/.local/lib/python3.10/site-packages/chainlit/__init__.py", line 8, in <module>
    monkey.patch()
  File "/home/pedro/.local/lib/python3.10/site-packages/chainlit/lc/monkey.py", line 9, in patch
    import langchain
  File "/home/pedro/.local/lib/python3.10/site-packages/langchain/__init__.py", line 6, in <module>
    from langchain.agents import MRKLChain, ReActChain, SelfAskWithSearchChain
  File "/home/pedro/.local/lib/python3.10/site-packages/langchain/agents/__init__.py", line 2, in <module>
    from langchain.agents.agent import (
  File "/home/pedro/.local/lib/python3.10/site-packages/langchain/agents/agent.py", line 15, in <module>
    from langchain.agents.tools import InvalidTool
  File "/home/pedro/.local/lib/python3.10/site-packages/langchain/agents/tools.py", line 8, in <module>
    from langchain.tools.base import BaseTool, Tool, tool
  File "/home/pedro/.local/lib/python3.10/site-packages/langchain/tools/__init__.py", line 27, in <module>
    from langchain.tools.playwright import (
  File "/home/pedro/.local/lib/python3.10/site-packages/langchain/tools/playwright/__init__.py", line 3, in <module>
    from langchain.tools.playwright.click import ClickTool
  File "/home/pedro/.local/lib/python3.10/site-packages/langchain/tools/playwright/click.py", line 11, in <module>
    from langchain.tools.playwright.base import BaseBrowserTool
  File "/home/pedro/.local/lib/python3.10/site-packages/langchain/tools/playwright/base.py", line 15, in <module>
    from playwright.async_api import Browser as AsyncBrowser
  File "/home/pedro/.local/lib/python3.10/site-packages/playwright/async_api/__init__.py", line 25, in <module>
    import playwright.async_api._generated
  File "/home/pedro/.local/lib/python3.10/site-packages/playwright/async_api/_generated.py", line 25, in <module>
    from playwright._impl._accessibility import Accessibility as AccessibilityImpl
  File "/home/pedro/.local/lib/python3.10/site-packages/playwright/_impl/_accessibility.py", line 17, in <module>
    from playwright._impl._connection import Channel
  File "/home/pedro/.local/lib/python3.10/site-packages/playwright/_impl/_connection.py", line 35, in <module>
    from pyee import EventEmitter
  File "/home/pedro/.local/lib/python3.10/site-packages/pyee/__init__.py", line 73, in <module>
    from pyee._trio import TrioEventEmitter  # noqa
  File "/home/pedro/.local/lib/python3.10/site-packages/pyee/_trio.py", line 4, in <module>
    import trio
  File "/home/pedro/.local/lib/python3.10/site-packages/trio/__init__.py", line 18, in <module>
    from ._core import (
  File "/home/pedro/.local/lib/python3.10/site-packages/trio/_core/__init__.py", line 27, in <module>
    from ._run import (
  File "/home/pedro/.local/lib/python3.10/site-packages/trio/_core/_run.py", line 2452, in <module>
    from ._io_epoll import EpollIOManager as TheIOManager
  File "/home/pedro/.local/lib/python3.10/site-packages/trio/_core/_io_epoll.py", line 188, in <module>
    class EpollIOManager:
  File "/home/pedro/.local/lib/python3.10/site-packages/trio/_core/_io_epoll.py", line 189, in EpollIOManager
    _epoll = attr.ib(factory=select.epoll)
AttributeError: module 'select' has no attribute 'epoll'. Did you mean: 'poll'?

I'm missing something here?

@willydouhard
Copy link
Collaborator

Hello, someone had a similar issue and fixed it by setting a new env (https://discord.com/channels/1088038867602526210/1113461363197608047/1114256583317270600).

What python version os and terminal do you use?

@sam-vish
Copy link

sam-vish commented Jun 2, 2023

Update the packages or try Virtual environment

alimtunc pushed a commit that referenced this issue Aug 16, 2023
fix: Template warning is not aligned with variable select
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

3 participants