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

BeautifulSoup import from bs4 is not working even though it is an allowed import #64

Open
2 tasks done
josefco-02 opened this issue Oct 4, 2024 · 1 comment
Open
2 tasks done
Assignees
Labels
c-bug Category: Something isn't working

Comments

@josefco-02
Copy link

josefco-02 commented Oct 4, 2024

Prerequisites

  • I checked the documentation and found no answer to my problem
  • I checked the existing issues and made sure there are no similar bug reports

Category

Bug in Agentverse

Expected Behavior

The hosted agent should just write in the log.
image

Observed Behavior

When I import BeautifulSoup which is an allowed import, the agent freezes. Sometimes it doesn´t even print the ¨Starting agent¨ text.
image
It just stays that way no matter how long it keep running.

To Reproduce

Here is the hosted agent code, just remove/add the # at the beginning of the import to test it:

from uagents import Agent, Context
import requests
#from bs4 import BeautifulSoup

agent = Agent()

@agent.on_event("startup")
async def say_hello(ctx: Context):
    """Logs hello message on startup"""
    ctx.logger.info(f"Hello, I'm an agent.")

if __name__ == "__main__":
    agent.run()

Environment Details (Optional)

No response

Failure Logs (Optional)

No response

Additional Information (Optional)

No response

@jrriehl jrriehl added the c-bug Category: Something isn't working label Oct 4, 2024
@jrriehl
Copy link

jrriehl commented Oct 4, 2024

Hello, thanks for the issue! Sorry, but some of these packages are not yet available, but will soon be available, hopefully within the next couple of weeks. These are the currently available imports:

  • json
  • requests
  • cosmpy
  • datetime
  • enum
  • pydantic
  • math
  • time
  • uuid
  • ai_engine
  • random
  • MySQLdb
  • pymongo
  • _strptime
  • hashlib
  • hmac
  • base64
  • re

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c-bug Category: Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants