Error occurred during initialization of VM PyReportJasper

hi
i have problem with pyreportjasper when i click print i git this error

Error occurred during initialization of VM
Could not find agent library instrument on the library path, with error: La procÚdure spÚcifiÚe est introuvable
Module java.instrument may be missing from runtime image.

i install jdk 23 and i work with django 4.1 and pyreportjasper 2.1.4

this is my print function in views.py

def Demande_Intervention(request):
    REPORTS_DIR = os.path.join(os.path.abspath(os.path.dirname(__file__)),)
    input_file = os.path.join(REPORTS_DIR, 'Demande_Intervention.jasper')
    output_file = os.path.join(REPORTS_DIR, 'Demande_Intervention')
    print(input_file)
    print(output_file)
    jasper = PyReportJasper()
    con = {
        'driver': 'postgres',
        'username': settings.DATABASES['default']['USER'],
        'password': settings.DATABASES['default']['PASSWORD'],
        'host': settings.DATABASES['default']['HOST'],
        'database': settings.DATABASES['default']['NAME'],
        'port': settings.DATABASES['default']['PORT'],
        'jdbc_driver': 'org.postgresql.Driver'
    }
    pyreportjasper = PyReportJasper()
    pyreportjasper.config(
    input_file,
    output_file,
    output_formats=["pdf", "rtf"]
   )
    pyreportjasper.process_report()
    return FileResponse(open(output_file +'.pdf', 'rb'), as_attachment=True)

so please help me to solve this problem

Side Note: When posting code here, enclose the code between lines of three
backtick - ` characters. This means you’ll have a line of ```, then your code,
then another line of ```. This forces the forum software to keep your code
properly formatted. (I have taken the liberty of correcting your original posts.
Please remember to do this in the future.)

1 Like

thank you i understand …it because i am new here
i hope find solution for my issue