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

Failed to load delegate from edgetpu.dll #853

Open
shinytreecko opened this issue Jun 6, 2024 · 0 comments
Open

Failed to load delegate from edgetpu.dll #853

shinytreecko opened this issue Jun 6, 2024 · 0 comments
Labels
Hardware:USB Accelerator Coral USB Accelerator issues subtype:windows Windos Build/installation issues type:support Support question or issue

Comments

@shinytreecko
Copy link

shinytreecko commented Jun 6, 2024

Description

This is a strange issue. Every time I run my python code to use the Edge TPU, I get the following traceback:

Traceback (most recent call last):
 File "C:\Users\user\.conda\envs\pycoral\lib\site-packages\tflite_runtime\interpreter.py", line 160, in load_delegate
  delegate = Delegate(library, options)
 File "C:\Users\user\.conda\envs\pycoral\lib\site-packages\tflite_runtime\interpreter.py", line 119, in __init__
  raise ValueError(capture.message)
ValueError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
 File "C:\Users\user\Desktop\ocr_for_serials\nolag.py", line 11, in <module>
  interpreter = make_interpreter('edgetpu.tflite')
 File "C:\Users\user\.conda\envs\pycoral\lib\site-packages\pycoral\utils\edgetpu.py", line 87, in make_interpreter
  delegates = [load_edgetpu_delegate({'device': device} if device else {})]
 File "C:\Users\user\.conda\envs\pycoral\lib\site-packages\pycoral\utils\edgetpu.py", line 52, in load_edgetpu_delegate
  return tflite.load_delegate(_EDGETPU_SHARED_LIB, options or {})
 File "C:\Users\user\.conda\envs\pycoral\lib\site-packages\tflite_runtime\interpreter.py", line 162, in load_delegate
  raise ValueError('Failed to load delegate from {}\n{}'.format(
ValueError: Failed to load delegate from edgetpu.dll

I was trying to uninstall and reinstall the runtime and pycoral when this first happened, but was completely out of luck until I rebooted my machine and manually installed the edgetpu_runtime_20221024/edgetpu_runtime/third_party/usbdkUsbDk_1.0.22_x64.msi file as suggested in another issue. Now my code will launch and the TPU heats up (which must indicate that it's being used). I'm met with the exact same traceback if I close my program and run it again after making zero changes to the code. To solve this temporarily, I'm able to reboot my computer and reinstall the driver the same way as before, but having to constantly restart whenever my program is closed is very inconvenient. How can I fix this issue?

Click to expand!

Issue Type

Support

Operating System

Windows 10

Coral Device

USB Accelerator

Other Devices

No response

Programming Language

Python 3.9

Relevant Log Output

No response

@google-coral-bot google-coral-bot bot added Hardware:USB Accelerator Coral USB Accelerator issues subtype:windows Windos Build/installation issues type:support Support question or issue labels Jun 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Hardware:USB Accelerator Coral USB Accelerator issues subtype:windows Windos Build/installation issues type:support Support question or issue
Projects
None yet
Development

No branches or pull requests

1 participant