Blinkstick python error using raspberry pi install script

Hello, I had to recently restore my raspberry pi (pihole) from backup. My fault that the most recent backup I have is from 2019, but it was a pretty standard setup. I had backed it up immediately preceding the blinkstick install provided on the raspberry pi - blinkstick integration page. I run:

sudo apt-get install -y python-pip python2.7-dev

sudo pip install blinkstick

when I then try to run sudo blinkstick --info, or blinkstick --info I get a strange response indicating, from what I can tell, that there is a formatting error that is causing my python path to get very wonky. The specific error I receive is:

/usr/bin/env: ‘python\r’: No such file or directory

Does anyone have any idea what this is? I’ve restored from this backup many times and immediately taken steps to install blinkstick so I can get the blinktemp python script running and give me some vidusal indication as to the status of my pihole. I have never had this problem occur before.

Does anybody have any idea why only the blinkstick python calls are reporting this error? I got it installed and the script works, but any manual calls like blinkstick --pulse red return /usr/bin/env: ‘python\r’: No such file or directory

this is strange behavior, and the best I can come up with is that it may be that the python scripts in the blinkstick library were updated on a windows machine, and they aren’t interpreting it correctly. Does anybody here have any suggestion as to fixing this? I’ll post any necessary information.

SO I found out why. The most recent branch of the blinkstick install script must have been compiled for Windows (WHY oh WHY) because as soon as I ran dos2unix on the script in the path, it started working.
Had half hoped someone would have chimed in on this as it seems like something that someone would know, but don’t worry, I at least got to hunt down an issue and solve it myself.

Hey, thanks for posting the solution here. I’m just getting started on a small solution with blinkstick and immediately hit this problem (among a few other installation problems!)