Dadangdut33 / Speech-Translate

A realtime speech transcription and translation application using Whisper OpenAI and free translation API. Interface made using Tkinter. Code written fully in Python.
MIT License
423 stars 55 forks source link

[BUG] ImportError: cannot import name 'startfile' from 'os' (/usr/lib/python3.10/os.py) #58

Closed rdlmda closed 7 months ago

rdlmda commented 7 months ago

Describe the bug Won't start

To Reproduce Try to start

Expected behavior GUI showing up

Log

$ speech-translate 
Traceback (most recent call last):
  File "/home/user/.local/bin/speech-translate", line 5, in <module>
    from speech_translate.__main__ import main
  File "/home/user/.local/lib/python3.10/site-packages/speech_translate/__main__.py", line 38, in <module>
    from .ui.window.main import main  # pylint: disable=wrong-import-position
  File "/home/user/.local/lib/python3.10/site-packages/speech_translate/ui/window/main.py", line 23, in <module>
    from speech_translate.linker import bc, sj
  File "/home/user/.local/lib/python3.10/site-packages/speech_translate/linker.py", line 13, in <module>
    from speech_translate.utils.helper import generate_color, str_separator_to_html, wrap_result
  File "/home/user/.local/lib/python3.10/site-packages/speech_translate/utils/helper.py", line 9, in <module>
    from os import makedirs, path, startfile
ImportError: cannot import name 'startfile' from 'os' (/usr/lib/python3.10/os.py)

Desktop (please complete the following information):

Additional context See https://stackoverflow.com/q/62578790

Dadangdut33 commented 7 months ago

whoops i'm sorry about that. Forgot that it's a windows only import

Dadangdut33 commented 7 months ago

it should be fixed now, you can try pip install -U git+https://github.com/Dadangdut33/Speech-Translate.git --upgrade --force-reinstall --no-deps