hasscc / hass-edge-tts

🗣️ Microsoft Edge TTS for Home Assistant, no need for app_key
357 stars 62 forks source link

Cannot load edge_tts #35

Closed whxciotw closed 1 year ago

whxciotw commented 1 year ago

The lastest version has been installed through hacs or copying files from github. But HA cannot load edge_tts correctly, and the logs as below.

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/loader.py", line 728, in get_platform
    cache[full_name] = self._import_platform(platform_name)
  File "/usr/src/homeassistant/homeassistant/loader.py", line 745, in _import_platform
    return importlib.import_module(f"{self.pkg_path}.{platform_name}")
  File "/usr/local/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/config/custom_components/edge_tts/tts.py", line 12, in <module>
    raise Exception(f"edge_tts version is not {EDGE_TTS_VERSION}. Please install edge_tts {EDGE_TTS_VERSION}.")
Exception: edge_tts version is not 6.1.3. Please install edge_tts 6.1.3.
rany2 commented 1 year ago

Please install edge_tts version 6.1.3. do, pip install -U edge_tts

whxciotw commented 1 year ago

I have copied the lastest files from github to /custom_components/edge_tts, and the the command pip install -U edge_tts is still necessary?

rany2 commented 1 year ago

Yes, you need the latest edge_tts to use hass-edge-tts. This is to avoid bug reports that are actually resolved in the latest edge-tts.

whxciotw commented 1 year ago

Yes, you need the latest edge_tts to use hass-edge-tts. This is to avoid bug reports that are actually resolved in the latest edge-tts.

OK, thanks. The HA is installed via docker, and the edge_tts should be installed in another container? or in the HA container? or only be pip installed on OS?

rany2 commented 1 year ago

via docker

Tippye commented 1 year ago

I have the same question, I have found edge_tts 6.1.3 at the pip list wherever /custom_components/edge_tts or the container's shell, but it still raised this exception. The log is the same as the author's image, what should I do? I have run the command pip install -U edge_tts at those two directories.

rany2 commented 1 year ago

Could you try pip install edge_tts==6.1.3 instead?

Edit: also please provide pip list --format=freeze for the container shell

Tippye commented 1 year ago

Could you try pip install edge_tts==6.1.3 instead?

Edit: also please provide pip list --format=freeze for the container shell

Thanks, I wait for one day without anything, it can restart normally now.

rany2 commented 1 year ago

So it works?On 31 Jan 2023 12:46 PM, Tippye @.***> wrote:

Could you try pip install edge_tts==6.1.3 instead? Edit: also please provide pip list --format=freeze for the container shell

Thanks, I wait for one day without anything, it can restart normally now.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>