microsoft / Oryx

Build your repo automatically.
Other
751 stars 173 forks source link

Oryx build cannot find Django module in requirements.txt when it's there on Azure #1450

Open xprtizeadmin opened 2 years ago

xprtizeadmin commented 2 years ago

Hi,

I am trying to deploy a django application from github using Azure App service. I am new to cloud services. I am stuck on this for the last 2 days. I am pasting a part from my Oryx build logs. It would be great if someone can help resolve this issue. I have Django module in requirements.txt. Also, I have set SCM_DO_BUILD_DURING_DEPLOYMENT = True in Application settings. Also, I have requirements.txt file in the root folder.

Creating virtual environment... Activating virtual environment... Running pip install... "2022-06-29 10:03:08"|WARNING|Missing Django modile in Missing Django module in /tmp/8da59b65395601a/requirements.txt | Exit code: 0 | Add Django to your requirements.txt file. | More information: https://aka.ms/troubleshoot-python Not a vso image, so not writing build commands Preparing output...

Copying files to destination directory '/tmp/_preCompressedDestinationDir'... Done in 14 sec(s). Compressing content of directory '/tmp/_preCompressedDestinationDir'... Copied the compressed output to '/home/site/wwwroot'

Removing existing manifest file Creating a manifest file... Manifest file created.

Best regards, Irin

cormacpayne commented 2 years ago

@xprtizeadmin Hey there -- just to clarify, is the issue that you're receiving the warning about the missing Django module in the requirements.txt file? Also, if you're able to, would you mind providing the text of your requirements.txt file so we can attempt to reproduce locally? (specifically the Django dependency if you're not able to provide the entire file)

syakirsyed commented 1 year ago

Can anyone have a look at this? I'm facing the same issue. This is my requirements.txt file and here are the logs

remote: Using intermediate directory '/tmp/8dab83856e9be1b'. remote: remote: Copying files to the intermediate directory... remote: ............................................................................................ remote: Done in 96 sec(s). remote: remote: Source directory : /tmp/8dab83856e9be1b remote: Destination directory: /home/site/wwwroot remote: remote: Python Version: /opt/python/3.7.12/bin/python3.7 remote: Creating directory for command manifest file if it does not exist remote: Removing existing manifest file remote: Python Virtual Environment: antenv remote: Creating virtual environment... remote: ..... remote: Activating virtual environment... remote: Running pip install... remote: ............................................................................................................................................................ remote: [16:32:03+0000] Collecting amqp==5.0.2 remote: [16:32:04+0000] Downloading amqp-5.0.2-py3-none-any.whl (46 kB)

Downloads the remainder of packages in requirements and then

remote: Generating summary of Oryx build remote: Parsing the build logs remote: Found 1 issue(s) remote: remote: Build Summary : remote: =============== remote: Errors (0) remote: 1. Missing Django modile in Missing Django module in /tmp/8dab83856e9be1b/requirements.txt remote: - Next Steps: Add Django to your requirements.txt file. remote: - For more details you can browse to https://aka.ms/troubleshoot-python remote: remote: remote: Triggering recycle (preview mode disabled). remote: Deployment successful. deployer = deploymentPath =

osamabytes commented 12 months ago

Is this problem solved by anyone, if yes, then any help would be appreciable.

michielwillekens commented 10 months ago

Hi, I had this same issue, but this was caused, because my requirements.txt referenced other requirements file like this:

Convenience file for deploy that installs production requirements

-r requirements/requirements.txt -r requirements/prod-requirements.txt

As a measure I combined those files myself in the build step. Then this error was not displayed anymore.

It does seem a slightly different issue though with the situation of syakirsyed though.