Linked Github Repo won't deploy

Hello, new here to render, I’ve built a basic chatbot in Python using flask, and would like to test it, so I’m trying to deploy it on my server, it pulls in all the information correctly, and reads the requirements.txt ok, then it constantly says build failed.

I have linked my account and like I said, there are no errors to say that it can’t read from the repo because it can, and successfully runs the req file, but it always fails at the last second

Do I need to upgrade my subscription? I’m trying to deploy it on a free service for testing purposes, I wish to link it to twillio so I can test the conversational AI bot on my phone you see.

Thanks in advance.

David.

Hi David,

Thanks for reaching out.

I took a quick look at your account, but I can’t see any services, I assume you deleted it?

Please could you share any logs/error messages from the deploy logs? Alternatively, if you could leave a failed service in your account we could take a look to try and troubleshoot with you.

Thanks

Alan

Ok perfect thank you for getting back to me.

Yes I deleted the service. I will set it up again now.

David.

edit

that has failed again and is in my account now.

Thanks

David.

Hi David,

Thanks for leaving the failed service there.

The deploy logs show:

...
Mar 23 01:35:10 PM ERROR: Could not find a version that satisfies the requirement numpy==1.22.3 (from -r requirements.txt (line 12))
...

Looking at PyPi.org, numpy 1.22.3 requires Python >= 3.8. However, the version used on this service is 3.7, which also show in the deploy logs:

...
Mar 23 01:35:03 PM ==> Using Python version: 3.7.10
Mar 23 01:35:07 PM ==> Running build command 'pip install -r requirements.txt'...
...

You’ll need to set the Python version you need, which be done with PYTHON_VERSION environment variable, more details on this here in the docs: https://render.com/docs/python-version

Hope that helps

Kind regards

Alan

ah ah… ok perfect. Thanks for that. I’ll sort that. is there somewhere on my account I can see those logs too? It was just a console window for me that just said build failed so I couldn’t diagnose the issue any further.

Thanks
David.

Hi David,

The “Deploy” links in the “Events” section of the service show the build logs.

I think we could probably make that a little more obvious, I’ll speak to the team about it.

Kind regards

Alan

Hi Alan, so I’m back on this, due to other work commitments, I’ve just checked the version I am using is 3.8.5
Which is compatible with numpy, however, I’m not sure where I need specify PYTHON_VERISION within in my App for it to run on your server and not use the default?

Are there any docs on where to implement using flask?

Any help appreciated

David.

Hi David,

You may be using Python 3.8.5 locally, but your Render deploy logs still show:

... ==> Using Python version: 3.7.10

Which is the current default Python version on Render.

In the “Environment” section of the service dashboard, click the “Add Environment Variable” button. Add a key of PYTHON_VERSION and a value of 3.8.5. Save the change, which will trigger a new deploy and hopefully show 3.8.5 in the log line above, and continue to build successfully.

Hope that helps

Kind regards

Alan

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.