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] AttributeError: module 'subprocess' has no attribute 'STARTUPINFO' #59

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 
2023-12-16 06:02:25.466 | INFO    | setting.py:282 [MainThread] - Setting loaded
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 37, in <module>
    from speech_translate.ui.window.setting import SettingWindow
  File "/home/user/.local/lib/python3.10/site-packages/speech_translate/ui/window/setting.py", line 10, in <module>
    from speech_translate.ui.frame.setting.textbox import SettingTextbox
  File "/home/user/.local/lib/python3.10/site-packages/speech_translate/ui/frame/setting/textbox.py", line 4, in <module>
    from matplotlib import pyplot as plt
  File "/home/user/.local/lib/python3.10/site-packages/matplotlib/pyplot.py", line 56, in <module>
    import matplotlib.colorbar
  File "/home/user/.local/lib/python3.10/site-packages/matplotlib/colorbar.py", line 19, in <module>
    from matplotlib import _api, cbook, collections, cm, colors, contour, ticker
  File "/home/user/.local/lib/python3.10/site-packages/matplotlib/contour.py", line 14, in <module>
    from matplotlib.backend_bases import MouseButton
  File "/home/user/.local/lib/python3.10/site-packages/matplotlib/backend_bases.py", line 46, in <module>
    from matplotlib import (
  File "/home/user/.local/lib/python3.10/site-packages/matplotlib/text.py", line 16, in <module>
    from .font_manager import FontProperties
  File "/home/user/.local/lib/python3.10/site-packages/matplotlib/font_manager.py", line 1582, in <module>
    fontManager = _load_fontmanager()
  File "/home/user/.local/lib/python3.10/site-packages/matplotlib/font_manager.py", line 1576, in _load_fontmanager
    fm = FontManager()
  File "/home/user/.local/lib/python3.10/site-packages/matplotlib/font_manager.py", line 1041, in __init__
    *findSystemFonts(fontext=fontext)]:
  File "/home/user/.local/lib/python3.10/site-packages/matplotlib/font_manager.py", line 280, in findSystemFonts
    installed_fonts = _get_fontconfig_fonts()
  File "/home/user/.local/lib/python3.10/site-packages/matplotlib/font_manager.py", line 254, in _get_fontconfig_fonts
    if b'--format' not in subprocess.check_output(['fc-list', '--help']):
  File "/usr/lib/python3.10/subprocess.py", line 421, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/usr/lib/python3.10/subprocess.py", line 503, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/home/user/.local/lib/python3.10/site-packages/speech_translate/__main__.py", line 26, in __init__
    kwargs['startupinfo'] = subprocess.STARTUPINFO()
AttributeError: module 'subprocess' has no attribute 'STARTUPINFO'

Desktop (please complete the following information):

OS: Linux Mint 21.2 x86_64
App Installation version: module
App / Python version: Python 3.10.12

Additional context See https://stackoverflow.com/a/46281980

Dadangdut33 commented 7 months ago

yep i noticed that and been fixing it alongside adding some other things

rdlmda commented 7 months ago

If you need testing on Linux, let me know. I'm interested in the project.

Dadangdut33 commented 7 months ago

If you need testing on Linux, let me know. I'm interested in the project.

Thanks a lot, i'm currently using wsl and it's a little limited like i cannot test some stuff regarding to recording because of the device bridging and the tray app also could not work through wsl. For now can you tried the new commit? i tried it on some feature like file operation, model downloading, logger, cuda/gpu support, and stuff works fine on my end