Can't open or delete a pdf report generated within a Django 5.0 application #168
Unanswered
PabrodzamDEV
asked this question in
Q&A
Replies: 1 comment
-
|
Okay, so after an incredible amount of hours and frustration I got things working! I just closed output_stream at the end of the export_pdf() method from the Report class: report.py |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Greetings! First and foremost, I hope you will understand that I am a novice in the field of software development, particularly when it comes to web applications. Also, English is not my native language.
I am using PyReportJasper within the context of a Django 5.0 web application, and I am able to successfully generate and save the report as a PDF file. However, I am facing an issue where I encounter a java.io.IOException when attempting to open or delete the file from my file system. Interestingly, I am able to preview the file within my PyCharm IDE. The only way I can open or delete the file is by shutting down the local Django server.
I understand this is not a problem with the library, since I generated reports outside the django application in simple .py files and this issue did not arise, but since there are people way more experienced than me here I thought posting here is my best shot at finding a solution :)
I have included my code below, and I will also provide some screenshots to further illustrate the problem.
Beta Was this translation helpful? Give feedback.
All reactions