having an error for no reason

So I am using a flask application and I am using the website for downloading the files i have 3 such routes. 2 of them are working fine but the other one is not when hosted in railway. There are no logs in railway.app as well (logs like in flask app when run locally). I need to see the logs to fix this error. WHERE CAN I LOOK AT THE LOGS LIKE THE LOGS IN FLASK WHEN RUN LOCALLY. FYI all the routes work fine locally. Thanks in advance ☺️
Solution:
simply put, if you want error printouts, you need to handle and print your errors
Jump to solution
23 Replies
Percy
Percy3mo ago
Project ID: 00e06600-310c-429a-b9b3-2edeb7e5b005
みなと
みなと3mo ago
00e06600-310c-429a-b9b3-2edeb7e5b005
みなと
みなと3mo ago
I want to see these logs so that I can debug the errors. But this is strange why am I getting the error in the first place it works completely fine in local machine and also the logic is same for all the 3 routes
No description
Brody
Brody3mo ago
What's stopping you from opening your deployment logs?
みなと
みなと3mo ago
Yeah I have checked both the deployment logs and build logs there is nothing there
みなと
みなと3mo ago
No description
みなと
みなと3mo ago
This is all there is there are no logs of my flask application
Brody
Brody3mo ago
please let me know when you are on the desktop, mobile screens or pictures of your desktop screen are not helpful
みなと
みなと3mo ago
No description
みなと
みなと3mo ago
This is from my desktop.
Brody
Brody3mo ago
thank you so you want access logging?
みなと
みなと3mo ago
Yes something like this so that I can pin point the error that is happening
Brody
Brody3mo ago
access logging does not mean error logging, if you aren't seeing an error printout then you aren't properly handling your code's errors
みなと
みなと3mo ago
Actually I did try printing out the error inside the try catch block still nothing is getting printed both in the deploy and build logs Sorry try except block
Brody
Brody3mo ago
then nothing in that particular try catch block is erroring
みなと
みなと3mo ago
I am hosting some pdf right I want to download it. It is working totally fine in local machine but it is not downloading when hosted also I have 3 routes which has the same logic 2 of them are working but the last one isn't. FYI all the 3 routes are working fine in local machine
Brody
Brody3mo ago
I would need to see errors to be of any help
みなと
みなと3mo ago
Yeah but the errors are not getting printed is there anything specific I have to write for the errors to be seen. In profile or something
Brody
Brody3mo ago
^
みなと
みなと3mo ago
*procfile
Solution
Brody
Brody3mo ago
simply put, if you want error printouts, you need to handle and print your errors
Brody
Brody3mo ago
yes you can easily enable access logs, but that does not magically give you error logs since error logging is something you need to do properly in your code
みなと
みなと3mo ago
Okay i will see what changes I can do in my code