Matlab logging problem.

1 Ansicht (letzte 30 Tage)
Mahesh
Mahesh am 2 Aug. 2023
Beantwortet: Prateekshya am 30 Aug. 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.

Antworten (1)

Prateekshya
Prateekshya am 30 Aug. 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!

Kategorien

Mehr zu Scope Variables and Generate Names finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by