vhsantos / centreon_report_to_pdf

Make a PDF from CSV centreon data and sent it by email.
8 stars 4 forks source link

UnboundLocalError #7

Closed p1mpst4r closed 2 years ago

p1mpst4r commented 2 years ago

Hello, i've just installed you module and, on the test i received this error:

python centreon_report_to_pdf.py -c config2.ini

Traceback (most recent call last): File "centreon_report_to_pdf.py", line 13, in build_report() File "/root/centreon_report_to_pdf/BuildPDF.py", line 668, in build_report csv_url = prepare_csv_url() File "/root/centreon_report_to_pdf/Settings.py", line 401, in prepare_csv_url (Period_Start, Periodo_End) = convert_periodo_to_timestamp() File "/root/centreon_report_to_pdf/Settings.py", line 377, in convert_periodo_to_timestamp start_date = start_date.astimezone(server_timezone) UnboundLocalError: local variable 'start_date' referenced before assignment

any help will be appreciated.

thanks in advance

Lorenzo

vhsantos commented 2 years ago

HI,

did you setup the "period" parameter ??

If you still have problems, share your configuration file (taking off the sensitive data).

Attentive

p1mpst4r commented 2 years ago

Hello Victor... i managed to solve all the problems that (not surpised,) where all caused by my mistakes or misinterpretations of your wanderful code.

Thank you very much for your care of my problem.

Regards.

Lorenzo

vhsantos commented 2 years ago

Nice to know.