Skip to content
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

PermissionError for 'poetry add p4python' #2523

Closed
2 of 3 tasks
Celeborn2BeAlive opened this issue Jun 9, 2020 · 2 comments
Closed
2 of 3 tasks

PermissionError for 'poetry add p4python' #2523

Celeborn2BeAlive opened this issue Jun 9, 2020 · 2 comments
Labels
kind/bug Something isn't working as expected

Comments

@Celeborn2BeAlive
Copy link
Contributor

Celeborn2BeAlive commented Jun 9, 2020

  • I am on the latest Poetry version.
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option).
  • OS version and name: Windows 10 1903
  • Poetry version: 1.0.5
  • Link of a Gist with the contents of your pyproject.toml file: No need, the bug occurs with a new poetry project

Issue

When I try to add the perforce package with poetry add p4python in a newly created project I get the following error:

[PermissionError]
[WinError 5] Access is denied: 'C:\\Users\\laure\\AppData\\Local\\Temp\\tmprjqn7cu0\\unpacked\\p4python-2019.1.1858212\\devnotes.txt'

Here is the stack I obtain with -vvv:

Traceback (most recent call last):
  File "c:\users\laure\.local\pipx\venvs\poetry\lib\site-packages\clikit\console_application.py", line 131, in run
    status_code = command.handle(parsed_args, io)
  File "c:\users\laure\.local\pipx\venvs\poetry\lib\site-packages\clikit\api\command\command.py", line 120, in handle
    status_code = self._do_handle(args, io)
  File "c:\users\laure\.local\pipx\venvs\poetry\lib\site-packages\clikit\api\command\command.py", line 171, in _do_handle
    return getattr(handler, handler_method)(args, io, self)
  File "c:\users\laure\.local\pipx\venvs\poetry\lib\site-packages\cleo\commands\command.py", line 92, in wrap_handle
    return self.handle()
  File "c:\users\laure\.local\pipx\venvs\poetry\lib\site-packages\poetry\console\commands\add.py", line 149, in handle
    status = installer.run()
  File "c:\users\laure\.local\pipx\venvs\poetry\lib\site-packages\poetry\installation\installer.py", line 74, in run
    self._do_install(local_repo)
  File "c:\users\laure\.local\pipx\venvs\poetry\lib\site-packages\poetry\installation\installer.py", line 161, in _do_install
    ops = solver.solve(use_latest=self._whitelist)
  File "c:\users\laure\.local\pipx\venvs\poetry\lib\site-packages\poetry\puzzle\solver.py", line 36, in solve
    packages, depths = self._solve(use_latest=use_latest)
  File "c:\users\laure\.local\pipx\venvs\poetry\lib\site-packages\poetry\puzzle\solver.py", line 181, in _solve
    self._package, self._provider, locked=locked, use_latest=use_latest
  File "c:\users\laure\.local\pipx\venvs\poetry\lib\site-packages\poetry\mixology\__init__.py", line 7, in resolve_version
    return solver.solve()
  File "c:\users\laure\.local\pipx\venvs\poetry\lib\site-packages\poetry\mixology\version_solver.py", line 80, in solve
    next = self._choose_package_version()
  File "c:\users\laure\.local\pipx\venvs\poetry\lib\site-packages\poetry\mixology\version_solver.py", line 378, in _choose_package_version
    version = self._provider.complete_package(version)
  File "c:\users\laure\.local\pipx\venvs\poetry\lib\site-packages\poetry\puzzle\provider.py", line 550, in complete_package
    repository=package.dependency.source_name,
  File "c:\users\laure\.local\pipx\venvs\poetry\lib\site-packages\poetry\repositories\pool.py", line 115, in package
    package = repo.package(name, version, extras=extras)
  File "c:\users\laure\.local\pipx\venvs\poetry\lib\site-packages\poetry\repositories\pypi_repository.py", line 161, in package
    release_info = self.get_release_info(name, version)
  File "c:\users\laure\.local\pipx\venvs\poetry\lib\site-packages\poetry\repositories\pypi_repository.py", line 278, in get_release_info
    '{}:{}'.format(name, version), lambda: self._get_release_info(name, version)
  File "c:\users\laure\.local\pipx\venvs\poetry\lib\site-packages\cachy\repository.py", line 174, in remember_forever
    val = value(callback)
  File "c:\users\laure\.local\pipx\venvs\poetry\lib\site-packages\cachy\helpers.py", line 6, in value
    return val()
  File "c:\users\laure\.local\pipx\venvs\poetry\lib\site-packages\poetry\repositories\pypi_repository.py", line 278, in <lambda>
    '{}:{}'.format(name, version), lambda: self._get_release_info(name, version)
  File "c:\users\laure\.local\pipx\venvs\poetry\lib\site-packages\poetry\repositories\pypi_repository.py", line 345, in _get_release_info
    info = self._get_info_from_urls(urls)
  File "c:\users\laure\.local\pipx\venvs\poetry\lib\site-packages\poetry\repositories\pypi_repository.py", line 462, in _get_info_from_urls
    return self._get_info_from_sdist(urls['sdist'][0])
  File "c:\users\laure\.local\pipx\venvs\poetry\lib\site-packages\poetry\repositories\pypi_repository.py", line 494, in _get_info_from_sdist
    return self._inspector.inspect_sdist(filepath)
  File "C:\Users\laure\.pyenv\pyenv-win\versions\3.7.6-amd64\lib\contextlib.py", line 119, in __exit__
    next(self.gen)
  File "c:\users\laure\.local\pipx\venvs\poetry\lib\site-packages\poetry\utils\helpers.py", line 43, in temporary_directory
    yield name
  File "C:\Users\laure\.pyenv\pyenv-win\versions\3.7.6-amd64\lib\tempfile.py", line 807, in __exit__
    self.cleanup()
  File "C:\Users\laure\.pyenv\pyenv-win\versions\3.7.6-amd64\lib\tempfile.py", line 811, in cleanup
    _shutil.rmtree(self.name)
  File "C:\Users\laure\.pyenv\pyenv-win\versions\3.7.6-amd64\lib\shutil.py", line 516, in rmtree
    return _rmtree_unsafe(path, onerror)
  File "C:\Users\laure\.pyenv\pyenv-win\versions\3.7.6-amd64\lib\shutil.py", line 395, in _rmtree_unsafe
    _rmtree_unsafe(fullname, onerror)
  File "C:\Users\laure\.pyenv\pyenv-win\versions\3.7.6-amd64\lib\shutil.py", line 395, in _rmtree_unsafe
    _rmtree_unsafe(fullname, onerror)
  File "C:\Users\laure\.pyenv\pyenv-win\versions\3.7.6-amd64\lib\shutil.py", line 400, in _rmtree_unsafe
    onerror(os.unlink, fullname, sys.exc_info())
  File "C:\Users\laure\.pyenv\pyenv-win\versions\3.7.6-amd64\lib\shutil.py", line 398, in _rmtree_unsafe
    os.unlink(fullname)

I will try to fix it and submit a pull request.

@Celeborn2BeAlive Celeborn2BeAlive added kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Jun 9, 2020
@Celeborn2BeAlive
Copy link
Contributor Author

As I was updating my own repo I noticed the 1.0.8 was out and the install worked with my dev repo so I'm closing the issue, sorry !

Copy link

github-actions bot commented Mar 3, 2024

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Something isn't working as expected
Projects
None yet
Development

No branches or pull requests

2 participants