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

BackendAPI - Missing data, conf/controller and conf/scripts #17

Closed
rapcmia opened this issue Jun 21, 2024 · 1 comment
Closed

BackendAPI - Missing data, conf/controller and conf/scripts #17

rapcmia opened this issue Jun 21, 2024 · 1 comment
Assignees

Comments

@rapcmia
Copy link
Contributor

rapcmia commented Jun 21, 2024

Related to #16

The latest backend-api does not have the following on the bot folder:

  • /data
    2024-06-21 11:31:00,003 - root - ERROR - Error dumping account state: [Errno 2] No such file or directory: 'bots/data/account_state_history.json'
    2024-06-21 11:32:00,002 - root - ERROR - Error dumping account state: [Errno 2] No such file or directory: 'bots/data/account_state_history.json'
    2024-06-21 11:33:00,002 - root - ERROR - Error dumping account state: [Errno 2] No such file or directory: 'bots/data/account_state_history.json'
    2024-06-21 11:34:00,002 - root - ERROR - Error dumping account state: [Errno 2] No such file or directory: 'bots/data/account_state_history.json'
    2024-06-21 11:35:00,002 - root - ERROR - Error dumping account state: [Errno 2] No such file or directory: 'bots/data/account_state_history.json'
    2024-06-21 11:36:00,003 - root - ERROR - Error dumping account state: [Errno 2] No such file or directory: 'bots/data/account_state_history.json'
    2024-06-21 11:37:00,004 - root - ERROR - Error dumping account state: [Errno 2] No such file or directory: 'bots/data/account_state_history.json'
    
  • conf/controllers
INFO:     127.0.0.1:50126 - "GET /all-controller-configs HTTP/1.1" 500 Internal Server Error
ERROR:    Exception in ASGI application
Traceback (most recent call last):
  File "/Users/rapcomia/miniconda3/envs/backend-api/lib/python3.10/site-packages/uvicorn/protocols/http/h11_impl.py", line 396, in run_asgi
    result = await app(  # type: ignore[func-returns-value]
  File "/Users/rapcomia/miniconda3/envs/backend-api/lib/python3.10/site-packages/uvicorn/middleware/proxy_headers.py", line 70, in __call__
    return await self.app(scope, receive, send)
  File "/Users/rapcomia/miniconda3/envs/backend-api/lib/python3.10/site-packages/fastapi/applications.py", line 1054, in __call__
    await super().__call__(scope, receive, send)
  File "/Users/rapcomia/miniconda3/envs/backend-api/lib/python3.10/site-packages/starlette/applications.py", line 123, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/Users/rapcomia/miniconda3/envs/backend-api/lib/python3.10/site-packages/starlette/middleware/errors.py", line 186, in __call__
    raise exc
  File "/Users/rapcomia/miniconda3/envs/backend-api/lib/python3.10/site-packages/starlette/middleware/errors.py", line 164, in __call__
    await self.app(scope, receive, _send)
  File "/Users/rapcomia/miniconda3/envs/backend-api/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 65, in __call__
    await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
  File "/Users/rapcomia/miniconda3/envs/backend-api/lib/python3.10/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
    raise exc
  File "/Users/rapcomia/miniconda3/envs/backend-api/lib/python3.10/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    await app(scope, receive, sender)
  File "/Users/rapcomia/miniconda3/envs/backend-api/lib/python3.10/site-packages/starlette/routing.py", line 756, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/Users/rapcomia/miniconda3/envs/backend-api/lib/python3.10/site-packages/starlette/routing.py", line 776, in app
    await route.handle(scope, receive, send)
  File "/Users/rapcomia/miniconda3/envs/backend-api/lib/python3.10/site-packages/starlette/routing.py", line 297, in handle
    await self.app(scope, receive, send)
  File "/Users/rapcomia/miniconda3/envs/backend-api/lib/python3.10/site-packages/starlette/routing.py", line 77, in app
    await wrap_app_handling_exceptions(app, request)(scope, receive, send)
  File "/Users/rapcomia/miniconda3/envs/backend-api/lib/python3.10/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
    raise exc
  File "/Users/rapcomia/miniconda3/envs/backend-api/lib/python3.10/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    await app(scope, receive, sender)
  File "/Users/rapcomia/miniconda3/envs/backend-api/lib/python3.10/site-packages/starlette/routing.py", line 72, in app
    response = await func(request)
  File "/Users/rapcomia/miniconda3/envs/backend-api/lib/python3.10/site-packages/fastapi/routing.py", line 278, in app
    raw_response = await run_endpoint_function(
  File "/Users/rapcomia/miniconda3/envs/backend-api/lib/python3.10/site-packages/fastapi/routing.py", line 191, in run_endpoint_function
    return await dependant.call(**values)
  File "/Users/rapcomia/github/backend-api/15/routers/manage_files.py", line 63, in get_all_controller_configs
    for controller in file_system.list_files('conf/controllers'):
  File "/Users/rapcomia/github/backend-api/15/utils/file_system.py", line 38, in list_files
    return [f for f in os.listdir(dir_path) if os.path.isfile(os.path.join(dir_path, f)) and f not in excluded_files]
FileNotFoundError: [Errno 2] No such file or directory: 'bots/conf/controllers'
  • conf/scripts
    
    INFO:     127.0.0.1:50242 - "POST /add-script-config HTTP/1.1" 400 Bad Request
    INFO:     127.0.0.1:50243 - "POST /create-hummingbot-instance HTTP/1.1" 500 Internal Server Error
    ERROR:    Exception in ASGI application
    Traceback (most recent call last):
      File "/Users/rapcomia/miniconda3/envs/backend-api/lib/python3.10/site-packages/uvicorn/protocols/http/h11_impl.py", line 396, in run_asgi
        result = await app(  # type: ignore[func-returns-value]
      File "/Users/rapcomia/miniconda3/envs/backend-api/lib/python3.10/site-packages/uvicorn/middleware/proxy_headers.py", line 70, in __call__
        return await self.app(scope, receive, send)
      File "/Users/rapcomia/miniconda3/envs/backend-api/lib/python3.10/site-packages/fastapi/applications.py", line 1054, in __call__
        await super().__call__(scope, receive, send)
      File "/Users/rapcomia/miniconda3/envs/backend-api/lib/python3.10/site-packages/starlette/applications.py", line 123, in __call__
        await self.middleware_stack(scope, receive, send)
      File "/Users/rapcomia/miniconda3/envs/backend-api/lib/python3.10/site-packages/starlette/middleware/errors.py", line 186, in __call__
        raise exc
      File "/Users/rapcomia/miniconda3/envs/backend-api/lib/python3.10/site-packages/starlette/middleware/errors.py", line 164, in __call__
        await self.app(scope, receive, _send)
      File "/Users/rapcomia/miniconda3/envs/backend-api/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 65, in __call__
        await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
      File "/Users/rapcomia/miniconda3/envs/backend-api/lib/python3.10/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
        raise exc
      File "/Users/rapcomia/miniconda3/envs/backend-api/lib/python3.10/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
        await app(scope, receive, sender)
      File "/Users/rapcomia/miniconda3/envs/backend-api/lib/python3.10/site-packages/starlette/routing.py", line 756, in __call__
        await self.middleware_stack(scope, receive, send)
      File "/Users/rapcomia/miniconda3/envs/backend-api/lib/python3.10/site-packages/starlette/routing.py", line 776, in app
        await route.handle(scope, receive, send)
      File "/Users/rapcomia/miniconda3/envs/backend-api/lib/python3.10/site-packages/starlette/routing.py", line 297, in handle
        await self.app(scope, receive, send)
      File "/Users/rapcomia/miniconda3/envs/backend-api/lib/python3.10/site-packages/starlette/routing.py", line 77, in app
        await wrap_app_handling_exceptions(app, request)(scope, receive, send)
      File "/Users/rapcomia/miniconda3/envs/backend-api/lib/python3.10/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
        raise exc
      File "/Users/rapcomia/miniconda3/envs/backend-api/lib/python3.10/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
        await app(scope, receive, sender)
      File "/Users/rapcomia/miniconda3/envs/backend-api/lib/python3.10/site-packages/starlette/routing.py", line 72, in app
        response = await func(request)
      File "/Users/rapcomia/miniconda3/envs/backend-api/lib/python3.10/site-packages/fastapi/routing.py", line 278, in app
        raw_response = await run_endpoint_function(
      File "/Users/rapcomia/miniconda3/envs/backend-api/lib/python3.10/site-packages/fastapi/routing.py", line 191, in run_endpoint_function
        return await dependant.call(**values)
      File "/Users/rapcomia/github/backend-api/15/routers/manage_docker.py", line 73, in create_hummingbot_instance
        response = docker_manager.create_hummingbot_instance(config)
      File "/Users/rapcomia/github/backend-api/15/services/docker_service.py", line 112, in create_hummingbot_instance
        shutil.copytree(script_config_dir, destination_scripts_config_dir)
      File "/Users/rapcomia/miniconda3/envs/backend-api/lib/python3.10/shutil.py", line 557, in copytree
        with os.scandir(src) as itr:
    FileNotFoundError: [Errno 2] No such file or directory: 'bots/conf/scripts'
    

Workaround:

  • Manually add these missing folders and relaunch backend-api
@rapcmia rapcmia changed the title Backend-APi - Missing data, conf/controller and conf/scripts BackendAPI - Missing data, conf/controller and conf/scripts Jun 21, 2024
@david-hummingbot
Copy link
Contributor

Resolved in #18

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