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

AttributeError: 'Namespace' object has no attribute 'run_requires' #299

Closed
1 task done
LouisStAmour opened this issue Mar 12, 2021 · 0 comments · Fixed by #302
Closed
1 task done

AttributeError: 'Namespace' object has no attribute 'run_requires' #299

LouisStAmour opened this issue Mar 12, 2021 · 0 comments · Fixed by #302
Labels
🐛 bug Something isn't working

Comments

@LouisStAmour
Copy link

  • 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

Same as #293 but I'll try to write up a test case to reproduce this more easily.

Actual behavior

With 1.4.1 it now says:

uhid_freebsd.cpp:15:10: fatal error: 'dev/usb/usb_ioctl.h' file not found
#include <dev/usb/usb_ioctl.h>
         ^~~~~~~~~~~~~~~~~~~~~
1 error generated.
error: command '/usr/bin/clang' failed with exit code 1
Failed to build package, try parsing project files.
Traceback (most recent call last):
  File "/usr/local/bin/pdm", line 8, in <module>
    sys.exit(main())
  File "/usr/local/Cellar/pdm/1.4.1/libexec/lib/python3.9/site-packages/pdm/core.py", line 76, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/Cellar/pdm/1.4.1/libexec/lib/python3.9/site-packages/pdm/core.py", line 131, in main
    raise err.with_traceback(traceback)
  File "/usr/local/Cellar/pdm/1.4.1/libexec/lib/python3.9/site-packages/pdm/core.py", line 127, in main
    f(options.project, options)
  File "/usr/local/Cellar/pdm/1.4.1/libexec/lib/python3.9/site-packages/pdm/cli/commands/install.py", line 33, in handle
    actions.do_lock(project, strategy="all")
  File "/usr/local/Cellar/pdm/1.4.1/libexec/lib/python3.9/site-packages/pdm/cli/actions.py", line 70, in do_lock
    mapping, dependencies, summaries = resolve(
  File "/usr/local/Cellar/pdm/1.4.1/libexec/lib/python3.9/site-packages/pdm/resolver/core.py", line 152, in resolve
    result = resolver.resolve(requirements, max_rounds)
  File "/usr/local/Cellar/pdm/1.4.1/libexec/lib/python3.9/site-packages/resolvelib/resolvers.py", line 454, in resolve
    state = resolution.resolve(requirements, max_rounds=max_rounds)
  File "/usr/local/Cellar/pdm/1.4.1/libexec/lib/python3.9/site-packages/resolvelib/resolvers.py", line 348, in resolve
    failure_causes = self._attempt_to_pin_criterion(name, criterion)
  File "/usr/local/Cellar/pdm/1.4.1/libexec/lib/python3.9/site-packages/resolvelib/resolvers.py", line 208, in _attempt_to_pin_criterion
    criteria = self._get_criteria_to_update(candidate)
  File "/usr/local/Cellar/pdm/1.4.1/libexec/lib/python3.9/site-packages/resolvelib/resolvers.py", line 199, in _get_criteria_to_update
    for r in self._p.get_dependencies(candidate=candidate):
  File "/usr/local/Cellar/pdm/1.4.1/libexec/lib/python3.9/site-packages/pdm/resolver/providers.py", line 77, in get_dependencies
    deps, requires_python, summary = self.repository.get_dependencies(candidate)
  File "/usr/local/Cellar/pdm/1.4.1/libexec/lib/python3.9/site-packages/pdm/models/repositories.py", line 64, in get_dependencies
    requirements, requires_python, summary = getter(candidate)
  File "/usr/local/Cellar/pdm/1.4.1/libexec/lib/python3.9/site-packages/pdm/models/repositories.py", line 30, in wrapper
    result = func(self, candidate)
  File "/usr/local/Cellar/pdm/1.4.1/libexec/lib/python3.9/site-packages/pdm/models/repositories.py", line 141, in _get_dependencies_from_metadata
    deps = candidate.get_dependencies_from_metadata()
  File "/usr/local/Cellar/pdm/1.4.1/libexec/lib/python3.9/site-packages/pdm/models/candidates.py", line 214, in get_dependencies_from_metadata
    return filter_requirements_with_extras(metadata.run_requires, extras)
AttributeError: 'Namespace' object has no attribute 'run_requires'

Expected behavior

It installs fido2==0.9.1 on non-FreeBSD systems.

Environment Information

# Paste the output of `pdm info && pdm info --env` below:
PDM version:        1.4.1                                                   
Python Interpreter: .../.venv/bin/python (3.9.2)
Project Root:      ...                         
{
  "implementation_name": "cpython",
  "implementation_version": "3.9.2",
  "os_name": "posix",
  "platform_machine": "x86_64",
  "platform_release": "20.4.0",
  "platform_system": "Darwin",
  "platform_version": "Darwin Kernel Version 20.4.0: ...",
  "python_full_version": "3.9.2",
  "platform_python_implementaiton": "CPython",
  "python_version": "3.9",
  "sys_platform": "darwin"
}
@LouisStAmour LouisStAmour added the 🐛 bug Something isn't working label Mar 12, 2021
@LouisStAmour LouisStAmour changed the title AttributeError: 'Namespace' object AttributeError: 'Namespace' object has no attribute 'run_requires' Mar 12, 2021
frostming added a commit that referenced this issue Mar 13, 2021
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.

1 participant