Pupil AprilTag FileNotFoundError Could not find module

23 Views Asked by At

I'm currently working on trying to run this line of code through python:

from pupil_apriltags import Detector
import cv2
import numpy as np


at_detector = Detector(families='tag36h11',
                       nthreads=1,
                       quad_decimate=1.0,
                       quad_sigma=0.0,
                       refine_edges=1,
                       decode_sharpening=0.25,
                       debug=0,
                       winmode = 0)

and I'm running into this error:

Traceback (most recent call last):

  File ~\Desktop\EW401\Python April Tag\untitled1.py:13 in <module>
    at_detector = Detector(families='tag36h11',

  File ~\AppData\Roaming\Python\Python39\site-packages\pupil_apriltags\bindings.py:337 in __init__
    self.libc = ctypes.CDLL(str(hit))

  File C:\ProgramData\Anaconda3\lib\ctypes\__init__.py:382 in __init__
    self._handle = _dlopen(self._name, mode)

FileNotFoundError: Could not find module 'C:\Users\(redacted username)\AppData\Roaming\Python\Python39\site-packages\pupil_apriltags\lib\apriltag.dll' (or one of its dependencies). Try using the full path with constructor syntax.

I've been trying to figure it out for the past few days and have managed to find the location of the library on my laptop and through researching online tried using this fix that I found on a different forum:

os.add_dll_directory(r"C:\Users\(redacted username)\AppData\Roaming\Python\Python39\site-packages\pupil_apriltags.libs")

however, I am still running into issues. Any suggestions?

0

There are 0 best solutions below