- 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.
Matlab logging problem.
2 views (last 30 days)
Show older comments
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.
0 Comments
Answers (1)
Prateekshya
on 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:
If you are still unable to resolve the error, please create a ticket in MathWorks Technical Support. I hope this helps!
0 Comments
See Also
Categories
Find more on Scope Variables and Generate Names in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!