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

Error: Failed to merge native and python frames #673

Open
nazikus opened this issue Aug 1, 2024 · 0 comments
Open

Error: Failed to merge native and python frames #673

nazikus opened this issue Aug 1, 2024 · 0 comments

Comments

@nazikus
Copy link

nazikus commented Aug 1, 2024

py-spy top --native fails with OpenCV

Platform:

  • Ubuntu 22.04
  • python3.11

Minimal example to reproduce:

# opencv.py
import time
import cv2
import numpy as np


def main():
    while True:
        img = np.random.randint(0, 256, (480, 640, 3), dtype=np.uint8)
        cv2.resize(img, (10000, 10000))
        time.sleep(1)
        print('tick')


if __name__ == '__main__':
    main()

Run:

pip install opencv-python
py-spy record --native python opencv.py
# Error: Failed to merge native and python frames (Have 1 native and 2 python)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant