ENCODE-DCC / caper

Cromwell/WDL wrapper for Python
MIT License
50 stars 18 forks source link

filelock._error.Timeout: The file lock '/home/zjin/.caper/womtool_jar/womtool-65.jar.lock' could not be acquired. #162

Closed gavinjzg closed 1 year ago

gavinjzg commented 2 years ago

hey sir,i meet a problem.when i run the caper init local,it shows this misitake. i use the conda

caper init local /home/zjin/anaconda3/envs/encode-atac-seq-pipeline/lib/python3.6/site-packages/matplotlib/backends/qt_editor/figureoptions.py:11: MatplotlibDeprecationWarning: The support for Qt4 was deprecated in Matplotlib 3.3 and will be removed two minor releases later. from matplotlib.backends.qt_compat import QtGui 2022-03-29 15:28:42,058|caper.cromwell|INFO| Installing Cromwell JAR... https://github.com/broadinstitute/cromwell/releases/download/65/cromwell-65.jar 2022-03-29 15:28:42,058|autouri.autouri|INFO| cp: (37b3a4cb) started. src=https://github.com/broadinstitute/cromwell/releases/download/65/cromwell-65.jar, dest=/home/zjin/.caper/cromwell_jar/cromwell-65.jar 2022-03-29 15:28:44,774|autouri.autouri|INFO| cp: (37b3a4cb) skipped due to name_size_match. size=218314174, mt=1638909631.0 2022-03-29 15:28:44,775|caper.cromwell|INFO| Installing Womtool JAR... https://github.com/broadinstitute/cromwell/releases/download/65/womtool-65.jar 2022-03-29 15:28:44,776|autouri.autouri|INFO| cp: (d44ba4e0) started. src=https://github.com/broadinstitute/cromwell/releases/download/65/womtool-65.jar, dest=/home/zjin/.caper/womtool_jar/womtool-65.jar Traceback (most recent call last): File "/home/zjin/anaconda3/envs/encode-atac-seq-pipeline/bin/caper", line 13, in main() File "/home/zjin/anaconda3/envs/encode-atac-seq-pipeline/lib/python3.6/site-packages/caper/cli.py", line 702, in main init_caper_conf(parsed_args.conf, parsed_args.platform) File "/home/zjin/anaconda3/envs/encode-atac-seq-pipeline/lib/python3.6/site-packages/caper/caper_init.py", line 344, in init_caper_conf fp.write('{key}={val}\n'.format(key='womtool', val=cromwell.install_womtool())) File "/home/zjin/anaconda3/envs/encode-atac-seq-pipeline/lib/python3.6/site-packages/caper/cromwell.py", line 481, in install_womtool self._womtool, self._womtool_install_dir, 'Womtool JAR' File "/home/zjin/anaconda3/envs/encode-atac-seq-pipeline/lib/python3.6/site-packages/caper/cromwell.py", line 33, in install_file return AutoURI(f).cp(path) File "/home/zjin/anaconda3/envs/encode-atac-seq-pipeline/lib/python3.6/site-packages/autouri/autouri.py", line 298, in cp with d.get_lock(no_lock=no_lock): File "/home/zjin/anaconda3/envs/encode-atac-seq-pipeline/lib/python3.6/site-packages/filelock/_api.py", line 211, in enter self.acquire() File "/home/zjin/anaconda3/envs/encode-atac-seq-pipeline/lib/python3.6/site-packages/filelock/_api.py", line 174, in acquire raise Timeout(self._lock_file) filelock._error.Timeout: The file lock '/home/zjin/.caper/womtool_jar/womtool-65.jar.lock' could not be acquired.

i have find the package in the directory. image please give me some advices,thanks!

leepc12 commented 2 years ago

That looks like a temporary problem. Can you simply re-run? Please let me know if it persists.

Ritetsu commented 1 year ago

That looks like a temporary problem. Can you simply re-run? Please let me know if it persists.

I got a similar problem while runing caper init local with 'cromwell-82.jar.lock' file:

  File "/workdir/anaconda3/envs/caper/bin/caper", line 13, in <module>
    main()
  File "/workdir/anaconda3/envs/caper/lib/python3.6/site-packages/caper/cli.py", line 709, in main
    init_caper_conf(parsed_args.conf, parsed_args.platform)
  File "/workdir/anaconda3/envs/caper/lib/python3.6/site-packages/caper/caper_init.py", line 181, in init_caper_conf
    '{key}={val}\n'.format(key='cromwell', val=cromwell.install_cromwell())
  File "/workdir/anaconda3/envs/caper/lib/python3.6/site-packages/caper/cromwell.py", line 481, in install_cromwell
    self._cromwell, self._cromwell_install_dir, 'Cromwell JAR'
  File "/workdir/anaconda3/envs/caper/lib/python3.6/site-packages/caper/cromwell.py", line 33, in install_file
    return AutoURI(f).cp(path)
  File "/workdir/anaconda3/envs/caper/lib/python3.6/site-packages/autouri/autouri.py", line 288, in cp
    with d.get_lock(no_lock=no_lock):
  File "/workdir/anaconda3/envs/caper/lib/python3.6/site-packages/filelock/_api.py", line 211, in __enter__
    self.acquire()
  File "/workdir/anaconda3/envs/caper/lib/python3.6/site-packages/filelock/_api.py", line 174, in acquire
    raise Timeout(self._lock_file)
filelock._error.Timeout: The file lock '/home/.caper/cromwell_jar/cromwell-82.jar.lock' could not be acquired.

And re-run doesn't help. Any suggestions on this? Thanks!

leepc12 commented 1 year ago

Please manually delete the lock file and try again.

$ rm /home/.caper/cromwell_jar/cromwell-82.jar.lock
Ritetsu commented 1 year ago

Please manually delete the lock file and try again.

$ rm /home/.caper/cromwell_jar/cromwell-82.jar.lock

It worked, thanks a lot!