Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initialization failure due to failure to read log files #701

Open
pedro7x opened this issue Sep 30, 2023 · 1 comment
Open

Initialization failure due to failure to read log files #701

pedro7x opened this issue Sep 30, 2023 · 1 comment
Labels
Milestone

Comments

@pedro7x
Copy link

pedro7x commented Sep 30, 2023

Depending on the characters present in the "command" parameter of the log files (log files generated by the script-server itself). The program does not start and generates the following error message:

  File "/opt/script-server/src/execution/logging.py", line 328, in _parameters_to_entry
    entry.start_time = ms_to_datetime(int(start_time))
ValueError: invalid literal for int() with base 10: '1686740150897\ncommand:python3 evento.py grupo PROBLEMA Data/Horário     : 20230614/062023.863946                               \x85   \x85

If I remove the special characters from the log file, the program starts normally.

I'm also able to start with the workaround below:

diff -uNr src/execution/logging.py_ORIG src/execution/logging.py
--- src/execution/logging.py_ORIG	2023-09-30 05:47:43.262481144 -0300
+++ src/execution/logging.py	2023-09-30 06:08:40.631369683 -0300
@@ -325,7 +325,8 @@
 
         start_time = parameters.get('start_time')
         if start_time:
-            entry.start_time = ms_to_datetime(int(start_time))
+            #entry.start_time = ms_to_datetime(int(start_time))
+            entry.start_time = ms_to_datetime(int(start_time.split('\n')[0]))
 
         return entry

I am using the latest release version available (1.18.0).

@bugy bugy added the bug label Oct 3, 2023
@bugy bugy added this to the 1.19.0 milestone Oct 3, 2023
@bugy
Copy link
Owner

bugy commented Oct 3, 2023

Hi @pedro7x thanks for reporting!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants