-
Notifications
You must be signed in to change notification settings - Fork 9
Check that the AS project path is a directory, not a file Issue #1254 #2078
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
base: master
Are you sure you want to change the base?
Conversation
Rebased and fixed conflicts, but looking at the code I found a few things that needed tidying up. Marked as drafted, will have a look in parallel with the postgres work (for when I need a quick break from postgres 🙂 ). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One of the issues linked has been fixed. The other, #1254, is still happening. Creating a local project, then setting the settings to
PROJECT:
PROJECT_TYPE: LOCAL
PROJECT_DESTINATION: 'local_project'
LOCAL:
PROJECT_PATH: '/home/bdepaula/autosubmit/a28x/conf/expdef_a28x.yml'
Will result in an error in autosubmit refresh
,
(autosubmit4) bdepaula@bsces107921:~/Development/python/workspace/autosubmit$ autosubmit refresh a28x
Autosubmit admin user: eadmin is not set
Autosubmit is running with 4.1.14
Autosubmit admin user: eadmin is not set
Copying /home/bdepaula/autosubmit/a28x/conf/expdef_a28x.yml into /home/bdepaula/autosubmit/a28x/proj
cp: cannot stat '/home/bdepaula/autosubmit/a28x/conf/expdef_a28x.yml/*': Not a directory
[ERROR] Arguments provided: Namespace(version=False, logfile='DEBUG', logconsole='WARNING', command='refresh', expid='a28x', model_conf=False, jobs_conf=False, update_version=False)
[ERROR] This is the experiment: <a28x> which had an issue with the command: <refresh> and it is currently using the Autosubmit Version: 4.1.14.
[CRITICAL] Can not copy /home/bdepaula/autosubmit/a28x/conf/expdef_a28x.yml into /home/bdepaula/autosubmit/a28x/proj. Exiting... [eCode=7063]
More info at https://autosubmit.readthedocs.io/en/master/troubleshooting/error-codes.html
(autosubmit4) bdepaula@bsces107921:~/Development/python/workspace/autosubmit$ autosubmit -lc DEBUG refresh a28x
Autosubmit admin user: eadmin is not set
Autosubmit is running with 4.1.14
Autosubmit admin user: eadmin is not set
The project folder /home/bdepaula/autosubmit/a28x/proj has been created.
Copying /home/bdepaula/autosubmit/a28x/conf/expdef_a28x.yml into /home/bdepaula/autosubmit/a28x/proj
cp: cannot stat '/home/bdepaula/autosubmit/a28x/conf/expdef_a28x.yml/*': Not a directory
[ERROR] Arguments provided: Namespace(version=False, logfile='DEBUG', logconsole='DEBUG', command='refresh', expid='a28x', model_conf=False, jobs_conf=False, update_version=False)
[ERROR] This is the experiment: <a28x> which had an issue with the command: <refresh> and it is currently using the Autosubmit Version: 4.1.14.
Traceback (most recent call last):
File "/home/bdepaula/Development/python/workspace/autosubmit/autosubmit/autosubmit.py", line 4804, in _copy_code
output = subprocess.check_output(
File "/home/bdepaula/mambaforge/envs/autosubmit4/lib/python3.10/subprocess.py", line 420, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "/home/bdepaula/mambaforge/envs/autosubmit4/lib/python3.10/subprocess.py", line 524, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command 'cp -R /home/bdepaula/autosubmit/a28x/conf/expdef_a28x.yml/* /home/bdepaula/autosubmit/a28x/proj/local_project' returned non-zero exit status 1.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/bdepaula/Development/python/workspace/autosubmit/autosubmit/scripts/autosubmit.py", line 105, in main
return_value = Autosubmit.run_command(args)
File "/home/bdepaula/Development/python/workspace/autosubmit/autosubmit/autosubmit.py", line 782, in run_command
return Autosubmit.refresh(args.expid, args.model_conf, args.jobs_conf)
File "/home/bdepaula/Development/python/workspace/autosubmit/autosubmit/autosubmit.py", line 3863, in refresh
if Autosubmit._copy_code(as_conf, expid, project_type, True):
File "/home/bdepaula/Development/python/workspace/autosubmit/autosubmit/autosubmit.py", line 4811, in _copy_code
raise AutosubmitCritical(f"Can not copy {local_project_path} into {project_path}."
log.log.AutosubmitCritical:
[CRITICAL] Can not copy /home/bdepaula/autosubmit/a28x/conf/expdef_a28x.yml into /home/bdepaula/autosubmit/a28x/proj. Exiting... [eCode=7063]
More info at https://autosubmit.readthedocs.io/en/master/troubleshooting/error-codes.html
It'd be easier to just check it's a path, if not raise a nice error asking the user to fix that.
Closes #1972
Closes #1254
Originally created by Edgar. The GitLab migration did not work on this (and another PR) as they were from branches in forks. Anyone can feel free to take over it, otherwise, when I have time I will try to finish it.