thevickypedia / Jarvis

Fully Functional Voice Based Natural Language UI
https://jarvis-health.vigneshrao.com
MIT License
209 stars 41 forks source link

Errors 305 and 263 and logging #35

Closed Valeros03 closed 1 year ago

Valeros03 commented 1 year ago

Hi, still me. Now I'm getting error 305 and 263. Here is what I got in the terminal:

Error 305 for command:
        open "C:\Users\sebyf\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\jarvis\indicators\acknowledgement.mp3"
    Cannot specify extra characters after a string enclosed in quotation marks.

    Error 263 for command:
        close "C:\Users\sebyf\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\jarvis\indicators\acknowledgement.mp3"
    The specified device is not open or is not recognized by MCI.
Failed to close the file: "C:\Users\sebyf\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\jarvis\indicators\acknowledgement.mp3"
Traceback (most recent call last):
  File "C:\Users\sebyf\OneDrive\Desktop\Jarvis\Jarv.py", line 4, in <module>
    jarvis.start()
  File "C:\Users\sebyf\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\jarvis\main.py", line 204, in start
    Activator().start()
  File "C:\Users\sebyf\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\jarvis\main.py", line 143, in start
    self.executor()
  File "C:\Users\sebyf\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\jarvis\main.py", line 109, in executor
    playsound(sound=models.indicators.acknowledgement, block=False)
  File "C:\Users\sebyf\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\playsound.py", line 72, in _playsoundWin
    winCommand(u'open {}'.format(sound))
  File "C:\Users\sebyf\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\playsound.py", line 64, in winCommand
    raise PlaysoundException(exceptionMessage)
playsound.PlaysoundException:
    Error 305 for command:
        open "C:\Users\sebyf\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\jarvis\indicators\acknowledgement.mp3"
    Cannot specify extra characters after a string enclosed in quotation marks.
Traceback (most recent call last):
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.3056.0_x64__qbz5n2kfra8p0\lib\logging\__init__.py", line 1732, in isEnabledFor
    return self._cache[level]
KeyError: None

It opens also opens a realtime Spectrum Display.

There's probably some logging promlem too or something related cause I also got this:

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\sebyf\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\comtypes\client\_events.py", line 111, in error_printer
    return func(self, this, *args, **kw)
  File "C:\Users\sebyf\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\comtypes\_comobject.py", line 600, in IUnknown_Release
    _debug("%r.Release() -> %s", self, result)
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.3056.0_x64__qbz5n2kfra8p0\lib\logging\__init__.py", line 1464, in debug
    if self.isEnabledFor(DEBUG):
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.3056.0_x64__qbz5n2kfra8p0\lib\logging\__init__.py", line 1734, in isEnabledFor
    _acquireLock()
TypeError: 'NoneType' object is not callable
Exception ignored on calling ctypes callback function: <function catch_errors.<locals>.call_with_this at 0x00000291BFD65BD0>
Traceback (most recent call last):
  File "C:\Users\sebyf\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\comtypes\_comobject.py", line 97, in call_with_this
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.3056.0_x64__qbz5n2kfra8p0\lib\logging\__init__.py", line 1505, in error
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.3056.0_x64__qbz5n2kfra8p0\lib\logging\__init__.py", line 1734, in isEnabledFor
TypeError: 'NoneType' object is not callable
Traceback (most recent call last):
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.3056.0_x64__qbz5n2kfra8p0\lib\logging\__init__.py", line 1732, in isEnabledFor
    return self._cache[level]
KeyError: None

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\sebyf\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\comtypes\client\_events.py", line 111, in error_printer
    return func(self, this, *args, **kw)
  File "C:\Users\sebyf\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\comtypes\_comobject.py", line 600, in IUnknown_Release
    _debug("%r.Release() -> %s", self, result)
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.3056.0_x64__qbz5n2kfra8p0\lib\logging\__init__.py", line 1464, in debug
    if self.isEnabledFor(DEBUG):
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.3056.0_x64__qbz5n2kfra8p0\lib\logging\__init__.py", line 1734, in isEnabledFor
    _acquireLock()
TypeError: 'NoneType' object is not callable
Exception ignored on calling ctypes callback function: <function catch_errors.<locals>.call_with_this at 0x00000270FCF35BD0>
Traceback (most recent call last):
  File "C:\Users\sebyf\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\comtypes\_comobject.py", line 97, in call_with_this
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.3056.0_x64__qbz5n2kfra8p0\lib\logging\__init__.py", line 1505, in error
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.3056.0_x64__qbz5n2kfra8p0\lib\logging\__init__.py", line 1734, in isEnabledFor
TypeError: 'NoneType' object is not callable

I don't know if you need it but, I'm Attaching some logging files. I hope this is going to help.

jarvis_29-07-2023.log mic_plotter_29-07-2023.log speech_synthesis_29-07-2023.log telegram_api_29-07-2023.log background_tasks_29-07-2023.log fast_api_29-07-2023.log fast_api_access_29-07-2023.log

thevickypedia commented 1 year ago

It seems like you're having a problem with playsound library, can you give this a shot

  1. Make sure your playsound library is installed and with the appropriate version
  2. pip freeze | grep playsound, output should be playsound==1.2.2
  3. Run the following
    import os
    from playsound import playsound
    playsound(os.path.join("indicators", "acknowledgement.mp3"))
  4. I've tested this on windows 10, so I'm not sure if there is any other dependency issue
  5. May be try to re-install and play around with it, to figure it out

As for the realtime spectrum, you may disable it (if you so choose) by setting an env var PLOT_MIC with the value False

Give it a shot and let me know how it goes

Valeros03 commented 1 year ago

Ok now it works. I was using the newest version of playsound which is 1.3.0. I unistalled it and installed the version 1.2.2 and It works. Now he can hear me. But I can't figure it out how to use credentials and API keys. For the rest it works perfect

thevickypedia commented 1 year ago

@Valeros03 The version should have been 1.2.2 as per the install.sh So I'm not sure how 1.3.0 got installed, but nevertheless glad it worked. Expand the more option under the ENV Variables section in the readme document for all the credentials and API keys. Let me know if you still have any other questions.

Valeros03 commented 1 year ago

I guess it was because I alredy had installed the 1.3.0 version and I'm not running it on a virtual env. Thank you for the help. I'm gonna test more feature this days.

thevickypedia commented 1 year ago

I'm closing this issue, please feel free to raise one if you got more questions or face any speed bumps