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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
馃悰 Keypress sound not working #4
Labels
bug
Something isn't working
Comments
wasi-master
changed the title
[BUG] Keypress sound not working
馃悰 Keypress sound not working
Apr 7, 2022
Sorry about the dirty hack! import os.path
sounds = os.path.join(os.path.dirname(__file__), "sounds", "mech.wav") Will update you shortly :) |
That works great !!! |
kraanzu
added a commit
that referenced
this issue
Apr 7, 2022
Thanks for the quick fix :) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug 馃悰
When pressing a key, instead of a sound coming, it shows an error at the bottom of the screen
To Reproduce 馃悾
Steps to reproduce the behavior:
Expected behavior 馃
It should play the keypress sound
Screenshots 馃
A still image of the error (from the gif)
Desktop (please complete the following information): 馃
Additional context 馃摑
It seems like the file path being passed to playsound is from the python 3.9 directory instead of being in the python 3.10 one where I installed termtyper. I've uninstalled playsound and termtyper from python 3.9, I only have them in python 3.10 but this still occurs.
File Tree
Python 3.10
Contains the sounds required
Python 3.9
Doesn't even have the termtyper directory
This line seems to be the problem
https://github.com/kraanzu/termtyper/blob/9da5010f8349bd8bf487b5b48042d769c8e79c17/src/termtyper/utils/parser.py#L26-L35
This assumes the pip command is always going to be from the python interpreter termtyper is installed in. In my case, I have the pip command set to python 3.9, so the rich location shown by
pip show rich
is the one from that, for python 3.9 it would need to runpy -3.10 -m pip show rich
, but why does it even need to run these commands? just to get the path where termtyper is installed? for that you can just use the following snippet:This is what I use in my
pypi-command-line
package and it works great.I just realized that I can set
sounds_loc
in my config but it should set the location automatically thoughThe text was updated successfully, but these errors were encountered: