-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Add package from git not working on windows 10 #177
Comments
Can confirm this is still an issue |
Still seeing this issue as well in version 0.12.7. The following change to puzzle/provider.py#L199 (from synap5e's reference above) serves as a temporary workaround, but prevents cleanup of the Temp folder: except Exception:
raise
finally:
- shutil.rmtree(tmp_dir.as_posix())
+ pass
return [package] |
Commit c12d86b should fix the issue. It will land in the next bugfix version which should be released sometime next week. |
This should now be fixed in the latest |
Cleanup script file implementation
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Adding a package from a git repository on windows 10 does not work. The package is downloaded from the git repository as required without any issue. However, at some point some files in pypoetry-git-package_nameSOME_VALUE\.git\objects\pack\ are tried to be deletethat are write protected. Below is a complete example stack trace showing the errors when trying to execute the command
poetry -v add pendulum --git https://github.com/sdispater/pendulum.git
A solution to this might be
[PermissionError]
[WinError 5] Access is denied: 'C:/Users/Public/Temp/pypoetry-git-pendulumaj5p2d8l\.git\objects\pack\pack-37344d1961bffa13deda99e13c97ecda4c0c0013.idx'
Exception trace:
c:\program files (x86)\python36-32\lib\site-packages\cleo\application.py in run() at line 94
status_code = self.do_run(input_, output_)
c:\program files (x86)\python36-32\lib\site-packages\poetry\console\application.py in do_run() at line 87
return super(Application, self).do_run(i, o)
c:\program files (x86)\python36-32\lib\site-packages\cleo\application.py in do_run() at line 197
status_code = command.run(input_, output_)
c:\program files (x86)\python36-32\lib\site-packages\poetry\console\commands\command.py in run() at line 72
return super(BaseCommand, self).run(i, o)
c:\program files (x86)\python36-32\lib\site-packages\cleo\commands\base_command.py in run() at line 146
status_code = self.execute(input_, output_)
c:\program files (x86)\python36-32\lib\site-packages\cleo\commands\command.py in execute() at line 107
return self.handle()
c:\program files (x86)\python36-32\lib\site-packages\poetry\console\commands\add.py in handle() at line 134
status = installer.run()
c:\program files (x86)\python36-32\lib\site-packages\poetry\installation\installer.py in run() at line 75
self._do_install(local_repo)
c:\program files (x86)\python36-32\lib\site-packages\poetry\installation\installer.py in _do_install() at line 158
ops = solver.solve(use_latest=self._whitelist)
c:\program files (x86)\python36-32\lib\site-packages\poetry\puzzle\solver.py in solve() at line 35
self.package, provider, locked=locked, use_latest=use_latest
c:\program files (x86)\python36-32\lib\site-packages\poetry\mixology_init.py in resolve_version() at line 8
return solver.solve()
c:\program files (x86)\python36-32\lib\site-packages\poetry\mixology\version_solver.py in solve() at line 79
next = self._choose_package_version()
c:\program files (x86)\python36-32\lib\site-packages\poetry\mixology\version_solver.py in _choose_package_version() at line 354
packages = self._provider.search_for(dependency)
c:\program files (x86)\python36-32\lib\site-packages\poetry\puzzle\provider.py in search_for() at line 104
packages = self.search_for_vcs(dependency)
c:\program files (x86)\python36-32\lib\site-packages\poetry\puzzle\provider.py in search_for_vcs() at line 220
shutil.rmtree(tmp_dir.as_posix())
c:\program files (x86)\python36-32\lib\shutil.py in rmtree() at line 494
return _rmtree_unsafe(path, onerror)
c:\program files (x86)\python36-32\lib\shutil.py in _rmtree_unsafe() at line 384
_rmtree_unsafe(fullname, onerror)
c:\program files (x86)\python36-32\lib\shutil.py in _rmtree_unsafe() at line 384
_rmtree_unsafe(fullname, onerror)
c:\program files (x86)\python36-32\lib\shutil.py in _rmtree_unsafe() at line 384
_rmtree_unsafe(fullname, onerror)
c:\program files (x86)\python36-32\lib\shutil.py in _rmtree_unsafe() at line 389
onerror(os.unlink, fullname, sys.exc_info())
c:\program files (x86)\python36-32\lib\shutil.py in _rmtree_unsafe() at line 387
os.unlink(fullname)
The text was updated successfully, but these errors were encountered: