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.

Error in python example

See original GitHub issue
import cv2
import numpy as np
import insightface
from insightface.app import FaceAnalysis
from insightface.data import get_image as ins_get_image

app = FaceAnalysis()
app.prepare(ctx_id=0, det_size=(640, 640))
img = ins_get_image('t1')
faces = app.get(img)
rimg = app.draw_on(img, faces)
cv2.imwrite("./t1_output.jpg", rimg)

ModuleNotFoundError Traceback (most recent call last) <ipython-input-3-91a2923a61d1> in <module> 3 import insightface 4 from insightface.app import FaceAnalysis ----> 5 from insightface.data import get_image as ins_get_image 6 7 app = FaceAnalysis()

ModuleNotFoundError: No module named ‘insightface.data’

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7

github_iconTop GitHub Comments

1reaction
YuzheMaocommented, Dec 1, 2021

@samreen98 @YuzheMao OS and insightface version? Thank you. I’ve solved it after reinstalling Cython.

1reaction
shekarneocommented, Nov 13, 2021

!pip install -U insightface --force-reinstall fixed the issue

Read more comments on GitHub >

github_iconTop Results From Across the Web

8. Errors and Exceptions — Python 3.11.1 documentation
Look at the following example, which asks the user for input until a valid integer has been entered, but allows the user to...
Read more >
Error Types in Python - TutorialsTeacher
Python - Error Types ; IndexError. The IndexError is thrown when trying to access an item at an invalid index. Example: IndexError ;...
Read more >
Errors and Exceptions in Python - GeeksforGeeks
Errors are the problems in a program due to which the program will stop the execution. On the other hand, exceptions are raised...
Read more >
Python Exceptions (With Examples) - Programiz
Python Built-in Exceptions ; IndexError, Raised when the index of a sequence is out of range. ; KeyError, Raised when a key is...
Read more >
Errors and exceptions — Object-Oriented Programming in ...
Syntax errors are mistakes in the use of the Python language, and are analogous to spelling or grammar mistakes in a language like...
Read more >

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