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

RecursionError: maximum recursion depth exceeded when running in Restful App #1120

Open
1 task done
yangzk opened this issue Jan 20, 2025 · 1 comment
Open
1 task done
Labels
question Further information is requested

Comments

@yangzk
Copy link

yangzk commented Jan 20, 2025

Checklist

.

  • I've searched the project's issues.

❓ Question

I'm building an app and wrap the function pne.chat into a Restful API.
In my python termianl, I could import promptulate and run the pne.chat code, without any error.
However, when I start the Restful App in Flask, it reports the following error.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "PreprocessService.py", line 11, in <module>
    import promptulate as pne
  File "\lib\site-packages\promptulate\__init__.py", line 22, in <module>
    from promptulate.agents.assistant_agent.agent import AssistantAgent
  File "\lib\site-packages\promptulate\agents\assistant_agent\__init__    from promptulate.beta.agents.assistant_agent.agent import AssistantAgent
    from promptulate.beta import agents, rag, st
  File "\lib\site-packages\promptulate\beta\agents\__init__.py", line 1, in <module>
  File "\lib\site-packages\promptulate\beta\agents\assistant_agent\__init__.py", line 1, in <module>
    from promptulate.beta.agents.assistant_agent.agent import AssistantAgent
  File "\lib\site-packages\promptulate\beta\agents\assistant_agent\agent.py", line 6, in <module>
    from promptulate import uacp
  File "\lib\site-packages\promptulate\uacp\__init__.py", line 1, in <    from promptulate.uacp.agent import Agent
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 982, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 925, in _find_spec
  File "<frozen importlib._bootstrap_external>", line 1349, in find_spec
  File "<frozen importlib._bootstrap_external>", line 1318, in _get_spec
  File "<frozen importlib._bootstrap_external>", line 1290, in _path_importer_cache
RecursionError: maximum recursion depth exceeded while calling a Python object

My Python version:

python==3.9.0
promptulate==1.18.4
flask==3.0.3

Is this a bug?

📎 Additional context

@yangzk yangzk added the question Further information is requested label Jan 20, 2025
Copy link

Hello @yangzk, thanks for your first issue and interest in our work 😊!

If this is a bug report, please provide screenshots, relevant logs and minimum viable code to reproduce your issue, which will help us debug the problem.

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

No branches or pull requests

1 participant