Hi, I deployed my app and since then, it’s still “baking”. Can someone please tell me why it’s not yet deployed?
Here is the code on my GitHub page
I have tried to no avail to deploy it. It’s saying something like ‘sample.pdf’ is not found. But it’s there already. Also, I have deleted and redeployed the app. The problem still continues. Pls help!
Thanks for the suggestions @mathcatsand . However, I tried it but the problem continues. Everything was working well on my local server even without the sample.pdf. I’m not supposed to add a PDF file because the user will have to generate it. Still, I added it. No way. why then is it having issues?
The relevant pieces for deployment are the environment setup files. If there’s any problem with the Python code, it would be a different error message that comes up after your environment is built (i.e. “baked”).
Please can you copy the contents of the terminal after a clean reboot so we know where it is in the process? I’ve never used reportlab, so maybe there is a helpful message about a needed dependency.
That message was not displayed on my local computer as the code have to process and generate the PDF, making it available for displaying and downloading.
Your local environment will have nothing to do with the cloud deployment. The warning about updating pip can be ignored, in general.
You will get errors if you include built-in libraries in your requirements file. I see that base64 was in a previous version of your requirements file, but it’s currently removed, so I assume this error is no longer coming up.
So now we have an error processing your Python code, which means it got past building the environment. We can walk through it stepwise. In your code, right above where you call the show_pdf function, you can insert a Debian command to check if the file is there from the system’s perspective:
if submit:
# generate the pdf
generate_pdf()
ls = os.popen('ls').read()
st.markdown(ls.replace('\n',' \n'))
# display and download the pdf when prompted
show_pdf()
Can you confirm that the extra lines does print on your page that ‘sample.pdf’ is there?
@mathcatsand Yeah, it does display the ‘sample.pdf’ as well as all the other files in the current directory, thus confirming that ‘sample.pdf’ is there.
By the way, I copied your show_pdf function and deployed it and I don’t get an error about my example pdf not being found. (I do hit a different problem I’ve seen before where Chrome/Edge block the embed, but Firefox is fine.)
I’m really not sure why you’d get an error that there is “no such file” when you can confirm with ls that it is there…