Kashi: Show Current Song Lyrics on Touch Bar (Spotify / iTunes / Youtube)

Got it! It imported properly :slight_smile: but now having an error:

Traceback (most recent call last):
File "", line 1, in
ModuleNotFoundError: No module named 'requests'

I think this may be due to python3.8 installing instead of 3.7, could that be it? I don't think I have 3.7 installed.

Based on the new instructions for step 4 in the readme, i changed the 3 paths in BTT to be the following:

Launch Path: Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8

Parameters: -c


Any ideas for what to do here? Thanks!


The ModuleNotFoundError means you haven't installed the required modules.

You'll need to make sure the following Python package are installed: OsaScript, Requests, BeautifulSoup

To install a Python package, just type the following in your terminal. Then check the "site-packages" folder and you should be able to confirm that the package folder is there.

pip install requests


pip3 install requests
(for Python 3)

Got it! Seems like those finally installed properly.

I'm now getting another error though:

Traceback (most recent call last):
File "", line 117, in
File "", line 14, in main
IndexError: list index out of range

Any ideas? This is while trying to play a song on the Music.app that's downloaded locally to my computer

Hi there,

I'm not very familiar with coding or python. I installed all three packages and it all seems to be good until Step 4: Set Widget Parameters. I have Launch Path set as "/Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7",

parameters as "-c"

and environmental variables as "/Library/Frameworks/Python.Framework/Versions/3.7/lib/Python3.7/site-packages".

Right now, the touch bar says "File"",line 212, in "

I don't really know what " The Launch Path parameter must direct to your Python 3 install. " means, and same with "Path will also work"

Can you help me? Thanks!

It's saying

Traceback (most recent call last):
File "", line 212, in
File "", line 19, in main
File "", line 133, in processPlayerData
IndexError: list index out of range

in the return

SAME here. Have you found any ways to make it work?

@bttstuff, @henry_qiu, @iamtaolong:

Sorry for the slow response.

Are you using Music or Spotify? I experienced the same error as you when I used Music. However, after giving the permissions in "Automation", I was able to resolve the issue:

Hope that works for you. If not, I'm happy to continue investigating with you.
If possible, a screenshot of your config would help. Thanks!

My result is "Error/Nothing was returned". Can someone help? Thank you in advance.

i got this error

Traceback (most recent call last):
File "", line 19, in
NameError: name 'false' is not defined

it's not letting me install these:

it returns:
zsh: command not found: pip


Are you running with Spotify or Music?

Can you try running without Chrome in the background and let me know if that changes anything?

Sounds like you need to install pip and/or Python.

@nemobushido thanks, but ive installed python 3
Last login: Mon Jun 8 17:07:21 on ttys001

samhumphreys@Ruths-MacBook-Pro ~ % python3

Python 3.8.3 (v3.8.3:6f8c8320e9, May 13 2020, 16:29:34)

[Clang 6.0 (clang-600.0.57)] on darwin

Type "help", "copyright", "credits" or "license" for more information.


You can have Python3 installed without pip.

Can you check also that you're using pip and not pip3?

If you're sure pip/pip3 is installed, it may be that your PATH isn't configured in your environment variables.


ok, I tried to download pip, then did the command pip install osascript again

samhumphreys@Ruths-MacBook-Pro ~ % curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 1825k  100 1825k    0     0  5275k      0 --:--:-- --:--:-- --:--:-- 5275k
samhumphreys@Ruths-MacBook-Pro ~ % python get-pip.py
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Defaulting to user installation because normal site-packages is not writeable
Collecting pip
  Using cached pip-20.1.1-py2.py3-none-any.whl (1.5 MB)
Installing collected packages: pip
  Attempting uninstall: pip
    Found existing installation: pip 20.1.1
    Uninstalling pip-20.1.1:
      Successfully uninstalled pip-20.1.1
  WARNING: The scripts pip, pip2 and pip2.7 are installed in '/Users/samhumphreys/Library/Python/2.7/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed pip-20.1.1
samhumphreys@Ruths-MacBook-Pro ~ % pip install osascript
zsh: command not found: pip
samhumphreys@Ruths-MacBook-Pro ~ %

@nemobushido bump

Much like others here, I am receiving

Traceback (most recent call last):
File "", line 212, in
File "", line 19, in main
File "", line 133, in processPlayerData
IndexError: list index out of range

I have done everything I can think of with my Python config. to no avail

I think all "trues" and "falses" need to be "True" and "False" as python is case sensitive. However, after making this change, the widget is blank.

@Future_Face: Add the python directory to your PATH and then pip should work (the "WARNING" in your log text). By the way, I recommend using Python 3 instead of 2.

@rebelraiders101: Are you running Kashi or another app? Kashi only has one 'False' in the Python code, and it is already capitalized.

@ka_ho_Ng / @pickle_rick / @jrosenkrantz: Can you screenshot the "Widget Specific" side of your configuration. Just want to make sure you have the Launch Path configured correctly. Mine is below for reference.

Launch Path: /Library/Frameworks/Python.framework/Versions/3.7/bin/Python3.7
Parameters: -c
Environment Variables: /Library/Frameworks/Python.Framework/Versions/3.7/lib/Python3.7/site-packages

Launch Path is your Python 3 installation path. You should see a bunch of .py files in the folder there.

Environment Variables is the Site Packages folder where your installed modules are (just add "/site-packages" to the launch path). You should see the required modules 'osascript', 'requests' and 'beautifulsoup' in there after they're installed.

You're correct, my mistake. The readme on GitHub instructs to use the .json file. Silly me, I should have caught that during set up. I will have to retry using the proper py script

**actually I'm confused now, it appears like the python script is what should be in the BTT widget, but where (if anywhere) does the json file go?

Imprint | Privacy Policy