-
Notifications
You must be signed in to change notification settings - Fork 534
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
Not working for !Ubuntu linux #103
Comments
The best way to try and debug this IMHO is via setting up a Fedora VM, from any OS. Just use the default Fedora Workstation version, no changes, vanilla. You can get the images here: https://fedoraproject.org/workstation/download You can use VirtualBox or other, the setup should be fast enough, less than third minutes to get going. https://www.virtualbox.org/ And my instructions to reproduce should be clear. I have included all steps. |
same client error in wsl - clean ubuntu 22.04.3 and 3.11.5. |
Thanks for sharing @akashkuttappa, so that issue seems more for non-Ubuntu, probably non-Debian based linux. |
I have a similar issue. I'm using Llama2 and running it locally with ○
Starting...
▌ 01 is compatible with several local model providers.
[?] Which one would you like to use?:
> Ollama
LM Studio
1 Ollama model found. To download a new model, run ollama run <model-name>, then start a new 01 session.
For a full list of downloadable models, check out https://ollama.com/library
[?] Select a downloaded Ollama model:
> llama2
Using Ollama model: llama2
Exception in thread Thread-9:
Traceback (most recent call last):
File "/usr/lib/python3.9/threading.py", line 954, in _bootstrap_inner
self.run()
File "/usr/lib/python3.9/threading.py", line 892, in run
self._target(*self._args, **self._kwargs)
File "/usr/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete
return future.result()
File "/home/avp/tmp/src/openia_01/software/source/server/server.py", line 413, in main
service_instance = ServiceClass(config)
File "/home/avp/tmp/src/openia_01/software/source/server/services/tts/piper/tts.py", line 13, in __init__
self.install(config["service_directory"])
File "/home/avp/tmp/src/openia_01/software/source/server/services/tts/piper/tts.py", line 64, in install
urllib.request.urlretrieve(asset_url, os.path.join(PIPER_FOLDER_PATH, PIPER_ASSETNAME))
UnboundLocalError: local variable 'asset_url' referenced before assignment
ALSA lib pcm_dsnoop.c:638:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dmix.c:1075:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm_oss.c:377:(_snd_pcm_oss_open) Unknown field port
ALSA lib pcm_oss.c:377:(_snd_pcm_oss_open) Unknown field port
ALSA lib pcm_a52.c:823:(_snd_pcm_a52_open) a52 is only for playback
ALSA lib pcm_usb_stream.c:486:(_snd_pcm_usb_stream_open) Invalid type for card
ALSA lib pcm_usb_stream.c:486:(_snd_pcm_usb_stream_open) Invalid type for card
ALSA lib pcm_dmix.c:1075:(snd_pcm_dmix_open) unable to open slave
Recording started...
Recording stopped.
Recording started...
Recording stopped. My OS:
|
the "assert_url" issue was fixed with the PR #175 in my Debian, but now I have the next error: Starting...
ALSA lib pcm_dsnoop.c:638:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dmix.c:1075:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm_oss.c:377:(_snd_pcm_oss_open) Unknown field port
ALSA lib pcm_oss.c:377:(_snd_pcm_oss_open) Unknown field port
ALSA lib pcm_a52.c:823:(_snd_pcm_a52_open) a52 is only for playback
ALSA lib pcm_usb_stream.c:486:(_snd_pcm_usb_stream_open) Invalid type for card
ALSA lib pcm_usb_stream.c:486:(_snd_pcm_usb_stream_open) Invalid type for card
ALSA lib pcm_dmix.c:1075:(snd_pcm_dmix_open) unable to open slave
INFO: Started server process [2556990]
INFO: Waiting for application startup.
Task exception was never retrieved
future: <Task finished name='Task-6' coro=<put_kernel_messages_into_queue() done, defined at /home/avp/tmp/src/openia_01/software/source/server/utils/kernel.py:63> exception=FileNotFoundError(2, 'No such file or directory')>
Traceback (most recent call last):
File "/home/avp/tmp/src/openia_01/software/source/server/utils/kernel.py", line 65, in put_kernel_messages_into_queue
text = check_filtered_kernel()
File "/home/avp/tmp/src/openia_01/software/source/server/utils/kernel.py", line 47, in check_filtered_kernel
messages = get_kernel_messages()
File "/home/avp/tmp/src/openia_01/software/source/server/utils/kernel.py", line 23, in get_kernel_messages
with open('/var/log/dmesg', 'r') as file:
FileNotFoundError: [Errno 2] No such file or directory: '/var/log/dmesg'
Ready.
INFO: Application startup complete. |
With a simple touch a fixed the issue: sudo touch /var/log/dmesg Well, now is only missing the ALSA issue.. I'm close.. |
I am looking into the |
@mysticaltech Could you please rename this issue in regard to accessing |
The issue here is that To resolve this issue without any code changes run this command and change the access to the file: sudo touch /var/log/dmesg
sudo chmod go+w /var/log/dmesg
sudo dmesg --follow > /var/log/dmesg & |
@rbrisita But it's not just this, there is an issue for both client and server. Edit: Just did the rename |
Ah, I see... sorry I just saw the dmesg thing becuase that was the error I was having. In regards to your other errors, I believe it has to do with your OS and Python version: OS: Linux 6.7.9-200.fc39.x86_64 (Fedora 39 Gnome, wayland) Please see issue #219. |
Proposed PR solution:
Any input from team members would be appreciated. |
Before the above, I also fixed my PATH env variable to pickup dmesg from the OS directly and not brew. And the commands above did the trick! 🫡 |
Thanks @rbrisita! So server fixed! Now for the client, please see my response on the other issue. The client still does not work even when using Xorg in place of Wayland, same error |
Also just for clarification, that needs to be run everytime before starting the server correct? |
@rbrisita Progress not perfection. So cloning the project directly, I have been able to get much farther after your above recommendations. Now it's an Alsa issue. Fedora uses pipewire, and Alsa is also installed, but does not seem to work. 03:23:47 in 01/software on main via 01os-O75aX4we-py3.10
➜ poetry run 01
○
Starting...
INFO: Started server process [28795]
INFO: Waiting for application startup.
Ready.
INFO: Application startup complete.
INFO: Uvicorn running on http://0.0.0.0:10001 (Press CTRL+C to quit)
ALSA lib pcm_dmix.c:1000:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm.c:2721:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2721:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2721:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib confmisc.c:1377:(snd_func_refer) Unable to find definition 'cards.0.pcm.hdmi.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:5204:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5727:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2721:(snd_pcm_open_noupdate) Unknown PCM hdmi
ALSA lib confmisc.c:1377:(snd_func_refer) Unable to find definition 'cards.0.pcm.hdmi.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:5204:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5727:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2721:(snd_pcm_open_noupdate) Unknown PCM hdmi
ALSA lib confmisc.c:1377:(snd_func_refer) Unable to find definition 'cards.0.pcm.modem.0:CARD=0'
ALSA lib conf.c:5204:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5727:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2721:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline:CARD=0,DEV=0
ALSA lib confmisc.c:1377:(snd_func_refer) Unable to find definition 'cards.0.pcm.modem.0:CARD=0'
ALSA lib conf.c:5204:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5727:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2721:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline:CARD=0,DEV=0
ALSA lib confmisc.c:1377:(snd_func_refer) Unable to find definition 'cards.0.pcm.modem.0:CARD=0'
ALSA lib conf.c:5204:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5727:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2721:(snd_pcm_open_noupdate) Unknown PCM phoneline
ALSA lib confmisc.c:1377:(snd_func_refer) Unable to find definition 'cards.0.pcm.modem.0:CARD=0'
ALSA lib conf.c:5204:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5727:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2721:(snd_pcm_open_noupdate) Unknown PCM phoneline
ALSA lib dlmisc.c:339:(snd_dlobj_cache_get0) Cannot open shared library libasound_module_pcm_pipewire.so (/home/linuxbrew/.linuxbrew/Cellar/alsa-lib/1.2.11/lib/alsa-lib/libasound_module_pcm_pipewire.so: cannot open shared object file: No such file or directory)
ALSA lib dlmisc.c:339:(snd_dlobj_cache_get0) Cannot open shared library libasound_module_pcm_pipewire.so (/home/linuxbrew/.linuxbrew/Cellar/alsa-lib/1.2.11/lib/alsa-lib/libasound_module_pcm_pipewire.so: cannot open shared object file: No such file or directory)
ALSA lib pcm_dmix.c:1000:(snd_pcm_dmix_open) unable to open slave
ALSA lib dlmisc.c:339:(snd_dlobj_cache_get0) Cannot open shared library libasound_module_pcm_pipewire.so (/home/linuxbrew/.linuxbrew/Cellar/alsa-lib/1.2.11/lib/alsa-lib/libasound_module_pcm_pipewire.so: cannot open shared object file: No such file or directory)
ALSA lib dlmisc.c:339:(snd_dlobj_cache_get0) Cannot open shared library libasound_module_pcm_pipewire.so (/home/linuxbrew/.linuxbrew/Cellar/alsa-lib/1.2.11/lib/alsa-lib/libasound_module_pcm_pipewire.so: cannot open shared object file: No such file or directory)
INFO: ('127.0.0.1', 37364) - "WebSocket /" [accepted]
Hold the spacebar to start recording. Press CTRL-C to exit.INFO: connection open
Expression 'paInvalidSampleRate' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2050
Expression 'PaAlsaStreamComponent_InitialConfigure( &self->capture, inParams, self->primeBuffers, hwParamsCapture, &realSr )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2721
Expression 'PaAlsaStream_Configure( stream, inputParameters, outputParameters, sampleRate, framesPerBuffer, &inputLatency, &outputLatency, &hostBufferSizeMode )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2845
Exception in thread Thread-11 (record_audio):
Traceback (most recent call last):
File "/home/linuxbrew/.linuxbrew/opt/python@3.10/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
self.run()
File "/home/linuxbrew/.linuxbrew/opt/python@3.10/lib/python3.10/threading.py", line 953, in run
self._target(*self._args, **self._kwargs)
File "/home/karim/code/01/software/source/clients/base_device.py", line 157, in record_audio
stream = p.open(format=FORMAT, channels=CHANNELS, rate=RATE, input=True, frames_per_buffer=CHUNK)
File "/home/karim/.cache/pypoetry/virtualenvs/01os-O75aX4we-py3.10/lib/python3.10/site-packages/pyaudio/__init__.py", line 639, in open
stream = PyAudio.Stream(self, *args, **kwargs)
File "/home/karim/.cache/pypoetry/virtualenvs/01os-O75aX4we-py3.10/lib/python3.10/site-packages/pyaudio/__init__.py", line 441, in __init__
self._stream = pa.open(**arguments)
OSError: [Errno -9997] Invalid sample rate |
Ok, so I had alsa-lib installed via brew too. So removed that via 03:35:28 in 01/software on main
➜ poetry run 01
○
Starting...
INFO: Started server process [132777]
INFO: Waiting for application startup.
Ready.
INFO: Application startup complete.
INFO: Uvicorn running on http://0.0.0.0:10001 (Press CTRL+C to quit)
ALSA lib pcm_dmix.c:1000:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm.c:2721:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2721:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2721:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib confmisc.c:1377:(snd_func_refer) Unable to find definition 'cards.0.pcm.hdmi.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:5204:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5727:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2721:(snd_pcm_open_noupdate) Unknown PCM hdmi
ALSA lib confmisc.c:1377:(snd_func_refer) Unable to find definition 'cards.0.pcm.hdmi.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:5204:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5727:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2721:(snd_pcm_open_noupdate) Unknown PCM hdmi
ALSA lib confmisc.c:1377:(snd_func_refer) Unable to find definition 'cards.0.pcm.modem.0:CARD=0'
ALSA lib conf.c:5204:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5727:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2721:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline:CARD=0,DEV=0
ALSA lib confmisc.c:1377:(snd_func_refer) Unable to find definition 'cards.0.pcm.modem.0:CARD=0'
ALSA lib conf.c:5204:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5727:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2721:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline:CARD=0,DEV=0
ALSA lib confmisc.c:1377:(snd_func_refer) Unable to find definition 'cards.0.pcm.modem.0:CARD=0'
ALSA lib conf.c:5204:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5727:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2721:(snd_pcm_open_noupdate) Unknown PCM phoneline
ALSA lib confmisc.c:1377:(snd_func_refer) Unable to find definition 'cards.0.pcm.modem.0:CARD=0'
ALSA lib conf.c:5204:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5727:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2721:(snd_pcm_open_noupdate) Unknown PCM phoneline
ALSA lib pcm_dmix.c:1000:(snd_pcm_dmix_open) unable to open slave
INFO: ('127.0.0.1', 48382) - "WebSocket /" [accepted]
Hold the spacebar to start recording. Press CTRL-C to exit.
INFO: connection open
Recording started...
Recording stopped.
Recording started...
Recording stopped.
audio/wav /tmp/input_20240405033602788720.wav /tmp/output_20240405033602788879.wav
> Test one two test one
I'm here and ready to assist! How can I help you today?
Let me know what you'd like to do next.
Recording started...
Recording stopped.
audio/wav /tmp/input_20240405033628071344.wav /tmp/output_20240405033628071920.wav
> okay please I would like to open a browser with Google loaded
Sure, let me open it for you.
computer.browser.open("https://www.google.com") |
Ok, so getting better. I can talk, some errors some time, but it seems to be working more or less. Note that, I needed to use: sudo dnf install python3.10 python3.10-devel python3.10-tkinter
poetry env use /usr/bin/python3.10 The only thing, is that now I cannot open a browser, it gives me the following: AttributeError Traceback (most recent call last)
Cell In[49], line 2
1 print('##active_line1##')
----> 2 computer.browser.visit('https://www.google.com')
AttributeError: 'Browser' object has no attribute 'visit' Any ideas on how to fix this? |
It's working for me now, not the mac experience yet, but it's working. Freezes sometimes, and does not seem to be able to do everything, but am sure it will improve with time. So closing this issue for now. @rbrisita Thanks again for the unlock, really appreciate it. |
Great to hear that you made so much progress! Will look into what you did with the ALSA issue and hopefully that works for me. And yes, you should run |
I got a clean boot of 01OS! It responded in Arabic at first but then I told it not to and it fixed itself. Lol, a surprise. 🤯 Found a way to resolve the ALSA errors: #138 (comment) Also, I realized that you don't have to run |
Created this PR #239. |
Describe the bug
Errors when running both server and client on linux.
01 --server
01 --client
To Reproduce
Steps to reproduce the behavior:
On Fedora 39 latest (same one used by Linus Torvalds):
sudo dnf install portaudio-devel ffmpeg cmake
python3.11 -m venv 01
andsource 01/bin/activate
sudo ln -s $(which gcc) /usr/local/bin/gcc-11
alsoexport CC=gcc
andexport CCACHE_DISABLE=1
pip install 01OS
, this should complete successfully.Expected behavior
Both client and server should work when they are run.
Screenshots
(Same as the above errors)
Desktop (please complete the following information):
Additional context
So impatient to try it!
The text was updated successfully, but these errors were encountered: