Matlab logging problem.

1 visualización (últimos 30 días)
Mahesh
Mahesh el 2 de Ag. de 2023
Respondida: Prateekshya el 30 de Ag. de 2024
I am using diary in matlab to log the message. When I am runing that script throught the python in local system, the logging of message is taking place. But when the same script is run throught the Gitlab pipeline the logging is not taking place.
Please tell me what might be the problem for this and how can I overcome this problem.
Thank you.

Respuestas (1)

Prateekshya
Prateekshya el 30 de Ag. de 2024
Hello Mahesh,
When using MATLAB's `diary` function to log messages, and it works locally but not in a GitLab CI/CD pipeline, following can be the potential issues:
  • File Permissions: The GitLab runner might not have the necessary permissions to write to the directory where the diary file is being saved. Ensure that the directory where you are trying to save the diary file is writable by the GitLab runner. You can modify the permissions or choose a directory with appropriate permissions.
  • File Paths: The file path used in the `diary` function might be incorrect or not accessible in the GitLab environment. Use absolute paths instead of relative paths. Ensure that the path exists in the GitLab runner's environment. You can print the current working directory in your script to verify it.
  • MATLAB Environment: The MATLAB environment in the GitLab runner might be different from your local environment, causing unexpected behavior. Check the MATLAB version and any environment variables that might affect the script's execution. Ensure consistency between local and CI environments.
  • GitLab Runner Configuration: The configuration of the GitLab runner might restrict certain operations or not initialize the environment properly. Review the runner's configuration and logs for any errors or warnings. Ensure that the runner is set up to support MATLAB execution.
If you are still unable to resolve the error, please create a ticket in MathWorks Technical Support. I hope this helps!

Categorías

Más información sobre Scope Variables and Generate Names en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by