You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am putting this issue here because the issue tab was not present in the open-webui/openapi-servers
I tried implementing a tool using openapi-servers and worked with a demo tool (summarizer-tool) given in the open-webui/openapi-servers repo.
And got the error
❯ uvicorn main:app --host 0.0.0.0 --reload (oumi_env)
INFO: Will watch forchangesin these directories: ['/Ajay/OWUI/openapi-servers/servers/summarizer-tool']
INFO: Uvicorn running on http://0.0.0.0:8000/ (Press CTRL+C to quit)
INFO: Started reloader process [3825629] using WatchFiles
Process SpawnProcess-1:
Traceback (most recent call last):
File "/home/appuser/anaconda3/envs/oumi_env/lib/python3.11/multiprocessing/[process.py](http://process.py/)", line 314, in _bootstrap
self.run()
File "/home/appuser/anaconda3/envs/oumi_env/lib/python3.11/multiprocessing/[process.py](http://process.py/)", line 108, in run
self._target(*self._args, **self._kwargs)
File "/home/appuser/anaconda3/envs/oumi_env/lib/python3.11/site-packages/uvicorn/_subprocess.py", line 80, in subprocess_started
target(sockets=sockets)
File "/home/appuser/anaconda3/envs/oumi_env/lib/python3.11/site-packages/uvicorn/[server.py](http://server.py/)", line 66, in run
return asyncio.run(self.serve(sockets=sockets))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/appuser/anaconda3/envs/oumi_env/lib/python3.11/asyncio/[runners.py](http://runners.py/)", line 190, in run
return runner.run(main)
^^^^^^^^^^^^^^^^
File "/home/appuser/anaconda3/envs/oumi_env/lib/python3.11/asyncio/[runners.py](http://runners.py/)", line 118, in run
return self._loop.run_until_complete(task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "uvloop/loop.pyx", line 1518, in uvloop.loop.Loop.run_until_complete
File "/home/appuser/anaconda3/envs/oumi_env/lib/python3.11/site-packages/uvicorn/[server.py](http://server.py/)", line 70, in serve
await self._serve(sockets)
File "/home/appuser/anaconda3/envs/oumi_env/lib/python3.11/site-packages/uvicorn/[server.py](http://server.py/)", line 77, in _serve
config.load()
File "/home/appuser/anaconda3/envs/oumi_env/lib/python3.11/site-packages/uvicorn/[config.py](http://config.py/)", line 435, in load
self.loaded_app = import_from_string(self.app)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/appuser/anaconda3/envs/oumi_env/lib/python3.11/site-packages/uvicorn/[importer.py](http://importer.py/)", line 19, in import_from_string
module = importlib.import_module(module_str)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/appuser/anaconda3/envs/oumi_env/lib/python3.11/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 940, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/Ajay/OWUI/openapi-servers/servers/summarizer-tool/[main.py](http://main.py/)", line 3, in<module>
from .summarizers.text_summarizer import TextSummarizer
ImportError: attempted relative import with no known parent package
I inspected the openapi-servers/servers/summarizer-tool/main.py and changed the 3rd line from .summarizers.text_summarizer import TextSummarizer to from summarizers.text_summarizer import TextSummarizer (removed the dot before summerizers) and solved my issue.
If this makes sense, please edit that in the main branch. If I need to put a pull request for this 😁, please let me know.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I am putting this issue here because the
issue
tab was not present in theopen-webui/openapi-servers
I tried implementing a tool using openapi-servers and worked with a demo tool (summarizer-tool) given in the
open-webui/openapi-servers
repo.And got the error
I inspected the
openapi-servers/servers/summarizer-tool/main.py
and changed the 3rd linefrom .summarizers.text_summarizer import TextSummarizer
tofrom summarizers.text_summarizer import TextSummarizer
(removed the dot before summerizers) and solved my issue.If this makes sense, please edit that in the main branch. If I need to put a pull request for this 😁, please let me know.
Beta Was this translation helpful? Give feedback.
All reactions