delegate_inference raise error in python-preview branch
See original GitHub issueDescribe the bug
while run pytest .
in semantic-kernel/python/tests
@staticmethod
def infer_delegate_type(function) -> DelegateTypes:
# Get the function signature
function_signature = signature(function)
awaitable = iscoroutinefunction(function)
for name, value in DelegateInference.__dict__.items():
if name.startswith("infer_") and hasattr(
> value.__wrapped__, "_delegate_type"
):
E AttributeError: 'staticmethod' object has no attribute '__wrapped__'
../semantic_kernel/orchestration/delegate_inference.py:240: AttributeError
======================================================================================= short test summary info =======================================================================================
FAILED test_text_skill.py::test_can_be_imported - AttributeError: 'staticmethod' object has no attribute '__wrapped__'
FAILED test_text_skill.py::test_can_be_imported_with_name - AttributeError: 'staticmethod' object has no attribute '__wrapped__'
===================================================================================== 2 failed, 9 passed in 0.23s =====================================================================================
To Reproduce Steps to reproduce the behavior:
- Go to
semantic-kernel/python/tests
- run ``pytest .`
Expected behavior this test should not raise error
Screenshots
Desktop (please complete the following information):
- OS: Mac M1
- IDE: VS Code
- Python version: 3.9.13
Additional context Add any other context about the problem here.
Issue Analytics
- State:
- Created 6 months ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
No results found
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
Agree with it!! i think set minimum version as 3.10+ and announce users will be fine 😃
@jjhenkel i think error comes from python version. i’m using python 3.9 and yours is 3.10.
here is reference (link)