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

[TypeError]: __init__() got an unexpected keyword argument 'platform' #185

Closed
1 task done
Aloxaf opened this issue Dec 3, 2020 · 2 comments · Fixed by #186
Closed
1 task done

[TypeError]: __init__() got an unexpected keyword argument 'platform' #185

Aloxaf opened this issue Dec 3, 2020 · 2 comments · Fixed by #186
Labels
🐛 bug Something isn't working

Comments

@Aloxaf
Copy link
Contributor

Aloxaf commented Dec 3, 2020

  • I have searched the issue tracker and believe that this is not a duplicate.

Make sure you run commands with -v flag before pasting the output.

Steps to reproduce

Create an new project and run pdm init && pdm install

Actual behavior

Synchronizing working set with lock file: 1 to add, 0 to update, 0 to remove

Installing the project as an editable package...
  ✖ Install test 0.0.0 failed
  See /tmp/pdm-install-fv9v7v7u.log for detailed debug log.
  [TypeError]: __init__() got an unexpected keyword argument 'platform'

BTW the log is empty

Expected behavior

There should be no error

Environment Information

PDM version:        0.11.1.dev20+g4557414
Python Interpreter: /usr/bin/python3 (3.9.0)
Project Root:       /tmp/test
{
  "implementation_name": "cpython",
  "implementation_version": "3.9.0",
  "os_name": "posix",
  "platform_machine": "x86_64",
  "platform_release": "5.9.11-zen2-1-zen",
  "platform_system": "Linux",
  "platform_version": "#1 ZEN SMP PREEMPT Sat, 28 Nov 2020 02:08:52 +0000",
  "python_full_version": "3.9.0",
  "platform_python_implementaiton": "CPython",
  "python_version": "3.9",
  "sys_platform": "linux"
}

The code which causes this bug is here:

https://github.com/frostming/pdm/blob/47dd14f92aee101cbe27122d5532717966527670/pdm/utils.py#L170-L171

I think pip may have changed its internal API.

@Aloxaf Aloxaf added the 🐛 bug Something isn't working label Dec 3, 2020
@Aloxaf
Copy link
Contributor Author

Aloxaf commented Dec 3, 2020

Oh, I noticed that there is also a permission error:

[PermissionError]: [Errno 13] Permission denied: '/usr/lib/python3.9/site-packages/_pdm_pep582.py'

Is this a feature (I must run pdm with root) or a bug (it can be put into ~/.local/lib)?

@frostming
Copy link
Collaborator

frostming commented Dec 3, 2020

Oh, thanks for the catch. Will rethink the design.

Also Thanks for testing the unreleased branch, for the original issue, downgrade pip to <20.3 should do the trick

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants