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

lc-serve deploy local api gives error #95

Open
wns-priyankson opened this issue Aug 4, 2023 · 2 comments
Open

lc-serve deploy local api gives error #95

wns-priyankson opened this issue Aug 4, 2023 · 2 comments
Assignees

Comments

@wns-priyankson
Copy link

I keep getting this error while runing lc-serve deploy local api in terminal.

`

(venv_xai) C:\Users\u393845\xyz\GenAI\pdfGPT>lc-serve deploy local api
⠹ Waiting gateway... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 0/1 0:00:20DeprecationWarning: the imp module is deprecated in favour of importlib; see the module'
s documentation for alternative uses (raised from C:\Users\u393845\venv_xai\lib\site-packages\win32\lib\pywintypes.py:2)
⠧ Waiting gateway... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 0/1 0:00:35ERROR gateway/rep-0@51188 AttributeError("module 'os' has no attribute 'unsetenv'") dur
ing 'GatewayRuntime' initialization [08/04/23 18:42:09]
add "--quiet-error" to suppress the exception details
Traceback (most recent call last):
File "C:\Users\u393845\venv_xai\lib\site-packages\jina\orchestrate\pods_init_.py", line 89, in run
runtime = AsyncNewLoopRuntime(
File "C:\Users\u393845\venv_xai\lib\site-packages\jina\serve\runtimes\asyncio.py", line 81, in init
self._loop.run_until_complete(self.async_setup())
File "C:\Users\u393845\venv_xai\lib\site-packages\nest_asyncio.py", line 89, in run_until_complete
return f.result()
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\asyncio\futures.py", line
178, in result
raise self._exception
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\asyncio\tasks.py", line
280, in step
result = coro.send(None)
File "C:\Users\u393845\venv_xai\lib\site-packages\jina\serve\runtimes\asyncio.py", line 255, in async_setup
self.server = self.get_server()
File "C:\Users\u393845\venv_xai\lib\site-packages\jina\serve\runtimes\asyncio.py", line 159, in get_server
return BaseGateway.load_config(
File "C:\Users\u393845\venv_xai\lib\site-packages\jina\jaml_init
.py", line 792, in load_config
obj = JAML.load(tag_yml, substitute=False, runtime_args=runtime_args)
File "C:\Users\u393845\venv_xai\lib\site-packages\jina\jaml_init
.py", line 174, in load
r = yaml.load(stream, Loader=get_jina_loader_with_runtime(runtime_args))
File "C:\Users\u393845\venv_xai\lib\site-packages\yaml_init
.py", line 114, in load
return loader.get_single_data()
File "C:\Users\u393845\venv_xai\lib\site-packages\yaml\constructor.py", line 51, in get_single_data
return self.construct_document(node)
File "C:\Users\u393845\venv_xai\lib\site-packages\yaml\constructor.py", line 55, in construct_document
data = self.construct_object(node)
File "C:\Users\u393845\venv_xai\lib\site-packages\yaml\constructor.py", line 100, in construct_object
data = constructor(self, node)
File "C:\Users\u393845\venv_xai\lib\site-packages\jina\jaml_init
.py", line 582, in _from_yaml
return get_parser(cls, version=data.get('version', None)).parse(
File "C:\Users\u393845\venv_xai\lib\site-packages\jina\jaml\parsers\gateway\legacy.py", line 56, in parse
obj = cls(
File "C:\Users\u393845\venv_xai\lib\site-packages\jina\serve\helper.py", line 72, in arg_wrapper
f = func(self, *args, **kwargs)
File "C:\Users\u393845\venv_xai\lib\site-packages\lcserve\backend\gateway.py", line 295, in init
self._init_fastapi_app()
File "C:\Users\u393845\venv_xai\lib\site-packages\lcserve\backend\gateway.py", line 332, in _init_fastapi_app
self._app = FastAPI()
File "C:\Users\u393845\venv_xai\lib\site-packages\lcserve\backend\playground\utils\helper.py", line 139, in exit
os.unsetenv(key)
AttributeError: module 'os' has no attribute 'unsetenv'
ERROR Flow@52724 Flow is aborted due to ['gateway'] can not be started. [08/04/23 18:42:09]
Traceback (most recent call last):
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 87, in run_code
exec(code, run_globals)
File "C:\Users\u393845\venv_xai\Scripts\lc-serve.exe_main
.py", line 7, in
File "C:\Users\u393845\venv_xai\lib\site-packages\click\core.py", line 1130, in call
return self.main(*args, **kwargs)
File "C:\Users\u393845\venv_xai\lib\site-packages\click\core.py", line 1055, in main
rv = self.invoke(ctx)
File "C:\Users\u393845\venv_xai\lib\site-packages\click\core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "C:\Users\u393845\venv_xai\lib\site-packages\click\core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "C:\Users\u393845\venv_xai\lib\site-packages\click\core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "C:\Users\u393845\venv_xai\lib\site-packages\click\core.py", line 760, in invoke
return callback(*args, **kwargs)
File "C:\Users\u393845\venv_xai\lib\site-packages\lcserve_main
.py", line 660, in local
serve_locally(module_str=module_str, fastapi_app_str=app, port=port, env=env)
File "C:\Users\u393845\venv_xai\lib\site-packages\lcserve_main
.py", line 51, in serve_locally
with Flow.load_config(f_yaml) as f:
File "C:\Users\u393845\venv_xai\lib\site-packages\jina\orchestrate\orchestrator.py", line 14, in enter
return self.start()
File "C:\Users\u393845\venv_xai\lib\site-packages\jina\orchestrate\flow\builder.py", line 33, in arg_wrapper
return func(self, *args, **kwargs)
File "C:\Users\u393845\venv_xai\lib\site-packages\jina\orchestrate\flow\base.py", line 1832, in start
self._wait_until_all_ready()
File "C:\Users\u393845\venv_xai\lib\site-packages\jina\orchestrate\flow\base.py", line 1975, in _wait_until_all_ready
raise RuntimeFailToStart
jina.excepts.RuntimeFailToStart

`Any idea?

@bhaskatripathi
Copy link
Owner

bhaskatripathi commented Aug 5, 2023

@deepankarm : please look into this issue

@iamsayeed
Copy link

I keep getting this error while runing lc-serve deploy local api in terminal.

`

(venv_xai) C:\Users\u393845\xyz\GenAI\pdfGPT>lc-serve deploy local api
⠹ Waiting gateway... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 0/1 0:00:20DeprecationWarning: the imp module is deprecated in favour of importlib; see the module'
s documentation for alternative uses (raised from C:\Users\u393845\venv_xai\lib\site-packages\win32\lib\pywintypes.py:2)
⠧ Waiting gateway... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 0/1 0:00:35ERROR gateway/rep-0@51188 AttributeError("module 'os' has no attribute 'unsetenv'") dur
ing 'GatewayRuntime' initialization [08/04/23 18:42:09]
add "--quiet-error" to suppress the exception details
Traceback (most recent call last):
File "C:\Users\u393845\venv_xai\lib\site-packages\jina\orchestrate\pods__init__.py", line 89, in run
runtime = AsyncNewLoopRuntime(
File "C:\Users\u393845\venv_xai\lib\site-packages\jina\serve\runtimes\asyncio.py", line 81, in init
self.loop.run_until_complete(self.async_setup())
File "C:\Users\u393845\venv_xai\lib\site-packages\nest_asyncio.py", line 89, in run_until_complete
return f.result()
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\asyncio\futures.py", line
178, in result
raise self.exception
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\asyncio\tasks.py", line
280, in step
result = coro.send(None)
File "C:\Users\u393845\venv_xai\lib\site-packages\jina\serve\runtimes\asyncio.py", line 255, in async_setup
self.server = self.get_server()
File "C:\Users\u393845\venv_xai\lib\site-packages\jina\serve\runtimes\asyncio.py", line 159, in get_server
return BaseGateway.load_config(
File "C:\Users\u393845\venv_xai\lib\site-packages\jina\jaml__init
.py", line 792, in load_config
obj = JAML.load(tag_yml, substitute=False, runtime_args=runtime_args)
File "C:\Users\u393845\venv_xai\lib\site-packages\jina\jaml__init
.py", line 174, in load
r = yaml.load(stream, Loader=get_jina_loader_with_runtime(runtime_args))
File "C:\Users\u393845\venv_xai\lib\site-packages\yaml__init
.py", line 114, in load
return loader.get_single_data()
File "C:\Users\u393845\venv_xai\lib\site-packages\yaml\constructor.py", line 51, in get_single_data
return self.construct_document(node)
File "C:\Users\u393845\venv_xai\lib\site-packages\yaml\constructor.py", line 55, in construct_document
data = self.construct_object(node)
File "C:\Users\u393845\venv_xai\lib\site-packages\yaml\constructor.py", line 100, in construct_object
data = constructor(self, node)
File "C:\Users\u393845\venv_xai\lib\site-packages\jina\jaml__init__.py", line 582, in _from_yaml
return get_parser(cls, version=data.get('version', None)).parse(
File "C:\Users\u393845\venv_xai\lib\site-packages\jina\jaml\parsers\gateway\legacy.py", line 56, in parse
obj = cls(
File "C:\Users\u393845\venv_xai\lib\site-packages\jina\serve\helper.py", line 72, in arg_wrapper
f = func(self, *args, **kwargs)
File "C:\Users\u393845\venv_xai\lib\site-packages\lcserve\backend\gateway.py", line 295, in init
self._init_fastapi_app()
File "C:\Users\u393845\venv_xai\lib\site-packages\lcserve\backend\gateway.py", line 332, in _init_fastapi_app
self._app = FastAPI()
File "C:\Users\u393845\venv_xai\lib\site-packages\lcserve\backend\playground\utils\helper.py", line 139, in exit
os.unsetenv(key)
AttributeError: module 'os' has no attribute 'unsetenv'
ERROR Flow@52724 Flow is aborted due to ['gateway'] can not be started. [08/04/23 18:42:09]
Traceback (most recent call last):
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 194, in _run_module_as_main
return run_code(code, main_globals, None,
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 87, in run_code
exec(code, run_globals)
File "C:\Users\u393845\venv_xai\Scripts\lc-serve.exe__main
.py", line 7, in
File "C:\Users\u393845\venv_xai\lib\site-packages\click\core.py", line 1130, in call
return self.main(*args, **kwargs)
File "C:\Users\u393845\venv_xai\lib\site-packages\click\core.py", line 1055, in main
rv = self.invoke(ctx)
File "C:\Users\u393845\venv_xai\lib\site-packages\click\core.py", line 1657, in invoke
return process_result(sub_ctx.command.invoke(sub_ctx))
File "C:\Users\u393845\venv_xai\lib\site-packages\click\core.py", line 1657, in invoke
return process_result(sub_ctx.command.invoke(sub_ctx))
File "C:\Users\u393845\venv_xai\lib\site-packages\click\core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "C:\Users\u393845\venv_xai\lib\site-packages\click\core.py", line 760, in invoke
return callback(*args, **kwargs)
File "C:\Users\u393845\venv_xai\lib\site-packages\lcserve__main
.py", line 660, in local
serve_locally(module_str=module_str, fastapi_app_str=app, port=port, env=env)
File "C:\Users\u393845\venv_xai\lib\site-packages\lcserve__main
.py", line 51, in serve_locally
with Flow.load_config(f_yaml) as f:
File "C:\Users\u393845\venv_xai\lib\site-packages\jina\orchestrate\orchestrator.py", line 14, in enter
return self.start()
File "C:\Users\u393845\venv_xai\lib\site-packages\jina\orchestrate\flow\builder.py", line 33, in arg_wrapper
return func(self, *args, **kwargs)
File "C:\Users\u393845\venv_xai\lib\site-packages\jina\orchestrate\flow\base.py", line 1832, in start
self._wait_until_all_ready()
File "C:\Users\u393845\venv_xai\lib\site-packages\jina\orchestrate\flow\base.py", line 1975, in _wait_until_all_ready
raise RuntimeFailToStart
jina.excepts.RuntimeFailToStart

`Any idea?

pip install jina

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

4 participants