File Exist error on locking
See original GitHub issueIssue description
After updating pipenv from 2018.11.26 to 2020.6.2 pipenv always crashes for one of my projects with this traceback:
┌─07-13:29[confus@confusion6:~/devel/doubleplusungood] e82d1:master(+3/-2)+* 1 ±
└▪ pipenv lock --verbose --dev
Locking [dev-packages] dependencies…
Building requirements...
Traceback (most recent call last):
File "/home/confus/.local/bin/pipenv", line 8, in <module>
sys.exit(cli())
File "/home/confus/.local/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "/home/confus/.local/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/home/confus/.local/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/confus/.local/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/confus/.local/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/home/confus/.local/lib/python3.6/site-packages/pipenv/vendor/click/decorators.py", line 73, in new_func
return ctx.invoke(f, obj, *args, **kwargs)
File "/home/confus/.local/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/home/confus/.local/lib/python3.6/site-packages/pipenv/vendor/click/decorators.py", line 21, in new_func
return f(get_current_context(), *args, **kwargs)
File "/home/confus/.local/lib/python3.6/site-packages/pipenv/cli/command.py", line 374, in lock
write=not state.quiet,
File "/home/confus/.local/lib/python3.6/site-packages/pipenv/core.py", line 1114, in do_lock
keep_outdated=keep_outdated
File "/home/confus/.local/lib/python3.6/site-packages/pipenv/utils.py", line 1318, in venv_resolve_deps
deps, project, r=False, include_index=True
File "/home/confus/.local/lib/python3.6/site-packages/pipenv/utils.py", line 1434, in convert_deps_to_pip
new_dep = Requirement.from_pipfile(dep_name, dep)
File "/home/confus/.local/lib/python3.6/site-packages/pipenv/vendor/requirementslib/models/requirements.py", line 2743, in from_pipfile
r = FileRequirement.from_pipfile(name, pipfile)
File "/home/confus/.local/lib/python3.6/site-packages/pipenv/vendor/requirementslib/models/requirements.py", line 1843, in from_pipfile
arg_dict["setup_info"] = arg_dict["parsed_line"].setup_info
File "/home/confus/.local/lib/python3.6/site-packages/pipenv/vendor/requirementslib/models/requirements.py", line 813, in setup_info
self.setup_info = self.get_setup_info()
File "/home/confus/.local/lib/python3.6/site-packages/pipenv/vendor/requirementslib/models/requirements.py", line 802, in get_setup_info
setup_info = SetupInfo.from_ireq(self.ireq, subdir=self.subdirectory)
File "/home/confus/.local/lib/python3.6/site-packages/pipenv/vendor/requirementslib/models/setup_info.py", line 1870, in from_ireq
shutil.copytree(path, target, symlinks=True)
File "/usr/lib/python3.6/shutil.py", line 321, in copytree
os.makedirs(dst)
File "/usr/lib/python3.6/os.py", line 220, in makedirs
mkdir(name, mode)
FileExistsError: [Errno 17] File exists: '/tmp/reqlib-srcqkiyds5t/..'
┌─07-13:29[confus@confusion6:~/devel/doubleplusungood] e82d1:master(+3/-2)+* 1 ±
└▪ pipenv lock --clear
Locking [dev-packages] dependencies…
Building requirements...
Traceback (most recent call last):
File "/home/confus/.local/bin/pipenv", line 8, in <module>
sys.exit(cli())
File "/home/confus/.local/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "/home/confus/.local/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/home/confus/.local/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/confus/.local/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/confus/.local/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/home/confus/.local/lib/python3.6/site-packages/pipenv/vendor/click/decorators.py", line 73, in new_func
return ctx.invoke(f, obj, *args, **kwargs)
File "/home/confus/.local/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/home/confus/.local/lib/python3.6/site-packages/pipenv/vendor/click/decorators.py", line 21, in new_func
return f(get_current_context(), *args, **kwargs)
File "/home/confus/.local/lib/python3.6/site-packages/pipenv/cli/command.py", line 374, in lock
write=not state.quiet,
File "/home/confus/.local/lib/python3.6/site-packages/pipenv/core.py", line 1114, in do_lock
keep_outdated=keep_outdated
File "/home/confus/.local/lib/python3.6/site-packages/pipenv/utils.py", line 1318, in venv_resolve_deps
deps, project, r=False, include_index=True
File "/home/confus/.local/lib/python3.6/site-packages/pipenv/utils.py", line 1434, in convert_deps_to_pip
new_dep = Requirement.from_pipfile(dep_name, dep)
File "/home/confus/.local/lib/python3.6/site-packages/pipenv/vendor/requirementslib/models/requirements.py", line 2743, in from_pipfile
r = FileRequirement.from_pipfile(name, pipfile)
File "/home/confus/.local/lib/python3.6/site-packages/pipenv/vendor/requirementslib/models/requirements.py", line 1843, in from_pipfile
arg_dict["setup_info"] = arg_dict["parsed_line"].setup_info
File "/home/confus/.local/lib/python3.6/site-packages/pipenv/vendor/requirementslib/models/requirements.py", line 813, in setup_info
self.setup_info = self.get_setup_info()
File "/home/confus/.local/lib/python3.6/site-packages/pipenv/vendor/requirementslib/models/requirements.py", line 802, in get_setup_info
setup_info = SetupInfo.from_ireq(self.ireq, subdir=self.subdirectory)
File "/home/confus/.local/lib/python3.6/site-packages/pipenv/vendor/requirementslib/models/setup_info.py", line 1870, in from_ireq
shutil.copytree(path, target, symlinks=True)
File "/usr/lib/python3.6/shutil.py", line 321, in copytree
os.makedirs(dst)
File "/usr/lib/python3.6/os.py", line 220, in makedirs
mkdir(name, mode
FileExistsError: [Errno 17] File exists: '/tmp/reqlib-srcxj1os9tf/..'
$ pipenv --support
Pipenv version: '2020.6.2'
Pipenv location: '/home/jan/.local/lib/python3.6/site-packages/pipenv'
Python location: '/usr/bin/python3'
Python installations found:
… hangs indefinetly trying to find python installations…
Issue Analytics
- State:
- Created 3 years ago
- Reactions:4
- Comments:10 (1 by maintainers)
Top Results From Across the Web
How to catch a "fatal index.lock: file exists" error when calling ...
Capturing the stdout worked. I was able to verify the functionality by placing an index.lock in the directory.
Read more >How to Solve `'git/index.lock': File exists` Error in Submodules
While I was working on this blog, I faced with that error several times. In this post, we'll look into a quick hacky...
Read more >"The document is locked for editing by another user" error ...
Cause. This behavior may occur if Word determines that the owner file for the document already exists. This may occur if one or...
Read more >Lock file exists: Collection did not finish update cleanly
This error indicates that an update failed because the collection was locked for updating. This is because it is currently updating, or the...
Read more >How to solve fatal error "Lock file exists - db.l...
can you try stopping Bitbucket and removing C:/Bitbucket/shared/data/db.lock.db manually ? You can then restart and see if it fixes your issue. Let me...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Basically this:
I helped myself by hacking
pipenv/vendor/requirementslib/models/setup_info.py:1870
via wrapping atry: shutil.copytree(path, target, symlinks=True) except OSError: pass
around thecopytree
command for now. Pipenv then proceeds normally (from what I can tell).The
pipenv --support
call hanging indefinitely seems to be different issue. @ pipenv team, is there a ticket for that? Should I create one?I think this is closeable at this point, pipenv==2022.4.21 is released. Let me know if it needs to be re-opened.