caleb4536
caleb4536
RRailway
Created by caleb4536 on 8/23/2023 in #✋|help
Deployment Issue: ModuleNotFoundError for Flask with Poetry-based Project
Hey Brody and Furimu, Thanks for getting back so quick! @Brody : Yep, was using poetry with a pyproject.toml before. Switched over to a requirements.txt now for the Railway deploy. @furimu : About the pyproject.toml - it had the usual stuff, dependencies and all. But since I'm on requirements.txt now, not sure if that matters anymore. Still, if you wanna see it, just let me know. Got the app up on Railway, but hitting an endpoint doesn’t give any response. Kinda stumped here. Here is my procfile:
web: gunicorn app:app
web: gunicorn app:app
and my app.py
from flask import Flask, jsonify
# import oss

app = Flask(__name__)

@app.route('/test', methods=['GET'])
def test():
return "Hello, World!"

if __name__ == "__main__":
app.run()
from flask import Flask, jsonify
# import oss

app = Flask(__name__)

@app.route('/test', methods=['GET'])
def test():
return "Hello, World!"

if __name__ == "__main__":
app.run()
and the command I'm using to call the server curl -X GET <url>/test Thanks a ton for the help!
14 replies
RRailway
Created by caleb4536 on 8/23/2023 in #✋|help
Deployment Issue: ModuleNotFoundError for Flask with Poetry-based Project
1fdaefcc-07e9-4a72-870a-ccc581cf5b25
14 replies