question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

delegate_inference raise error in python-preview branch

See original GitHub issue

Describe 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:

  1. Go to semantic-kernel/python/tests
  2. run ``pytest .`

Expected behavior this test should not raise error

Screenshots image

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:closed
  • Created 6 months ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
joowon-dm-snucommented, Mar 27, 2023

(I think, some point soon, we’ll have a discussion and pick a minimum Python version we’re looking to support. But until then, robustness to older versions is great)

Agree with it!! i think set minimum version as 3.10+ and announce users will be fine 😃

1reaction
joowon-dm-snucommented, Mar 27, 2023

@jjhenkel i think error comes from python version. i’m using python 3.9 and yours is 3.10.

here is reference (link) image

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found