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

detail "Not Found" #47

Open
ace-roger opened this issue Apr 2, 2023 · 6 comments
Open

detail "Not Found" #47

ace-roger opened this issue Apr 2, 2023 · 6 comments

Comments

@ace-roger
Copy link

Hi,

when I am running the v_2_2_1 example as a fast API app - getting {"detail":"Not Found"} on server.

Also, can you suggest, how to run and use modules for emsp role

@statiqantriksh
Copy link

@ace-roger Can help me with the endpoint you are trying to hit?

@ace-roger
Copy link
Author

Hi @statiqantriksh,

I was running it on my local machine v_2_2_1 example as given in the docs using the master branch.

Plan was to go through all modules from emsp perspective, maybe location first

Do guide me

Thanks

@statiqantriksh
Copy link

statiqantriksh commented Apr 4, 2023

@ace-roger
Try this endpoint from your local post man

http://<IP:PORT>/ocpi/cpo/2.2.1

You can also configure your main.py as mentioned below


import uvicorn
from cpo import get_application
from cpo.core import enums
from cpo.modules.versions.enums import VersionNumber
from datetime import datetime
from cpo.infra.mysql.connection import db as database
from cpo.core.crud import Crud
from cpo.core.adapter import Adapter
from cpo.core.logger.config import logger
from fastapi.responses import JSONResponse
# from starlette.websockets import WebSocket, WebSocketDisconnect
# from fastapi import WebSocket, WebSocketDisconnect
import os

app = get_application(
    [VersionNumber.v_2_2_1, VersionNumber.v_2_1_1],
    [enums.RoleEnum.cpo, enums.RoleEnum.emsp],
    Crud,
    Adapter,
)


@app.on_event("startup")
async def startup():
   print("Project has started")


if __name__ == "__main__":
    uvicorn.run("app:app", host="0.0.0.0", port=8000, log_level="info")
`

@ace-roger
Copy link
Author

Hi Antriksh,

Thanks for responding.

Unable to get any output.

Doubt - In main.py -> cpo.core = py-ocpi.core - Is this correct? - No module as cpo

@VictorTechs
Copy link
Collaborator

VictorTechs commented Sep 17, 2024

Hello @ace-roger,
Sorry for long response, could you tell me if everything is working now?
Regarding the second issue, in the main file, there is py-ocpi.core which is correctly imported, as I checked, could you confirm?

@IOR88
Copy link
Contributor

IOR88 commented Sep 22, 2024

Hi @ace-roger we are now getting back to ocpi library maintenance, we will soon take care of the request you created, have you successfully integrated ocpi lib with your project ?

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