Guys, I'm having trouble while trying to run kedro...
# questions
h
Guys, I'm having trouble while trying to run kedro on Azure Function. The error that I'm getting is
No module named recsys
Does anyone know how to make sure the package wheel is installed when publishing the function to azure? I'm executing the following command to publish it from local to Azure:
func azure functionapp publish FUNC_APP_NAME
Further Info: Here is my app folder
Copy code
.
├── __pycache__
│   └── function_app.cpython-311.pyc
├── dist
│   ├── conf-recsys.tar.gz
│   └── recsys-0.1-py3-none-any.whl
├── function_app.py
├── host.json
├── local.settings.json
├── pyproject.toml
└── requirements.txt
The following is the function_app code:
Copy code
import logging
import subprocess

import azure.functions as func

app = func.FunctionApp()

@app.route(route="DataPipeline", auth_level=func.AuthLevel.ANONYMOUS)
def DataPipeline(
    req: func.HttpRequest,
) -> func.HttpResponse:
    try:
        subprocess.run(
            [
                "python",
                "-m",
                "recsys",
                "-r",
                "ThreadRunner",
                "--conf-source=dist/conf-recsys.tar.gz",
            ],
            check=True,
            capture_output=True,
        )

        <http://logging.info|logging.info>("Data successfully saved to Blob Storage.")

    except Exception as e:
        logging.error(f"Error processing data: {e}")
        return func.HttpResponse(
            f"{e}\n{e.stderr}",
            status_code=500,
        )

    return func.HttpResponse("DB Extraction Succeded")
And requirements.txt
Copy code
--find-links dist
azure-functions
pyodbc
sqlalchemy
pandas
recsys
h
Someone will reply to you shortly. In the meantime, this might help:
j
hi @Hugo Barreto! since you already have a , are you doing
pip install recsys-...-any.whl
anywhere in your process? otherwise it won't work
h
Hi @Juan Luis! I'm struggling to make the pip install during build time when publishing the app into Azure. I have no idea how to do it and I'm unable to find an answer online. I hoped someone already faced this issue and had a solution to share
I think i finally found the solution. I'll try and, if it works, I'll post here
j
keep us posted 🙏🏼