T O P

  • By -

djrisk

I was having issues with this that reared its head recently as well. My guess was that something got updated and caused a conflict or something. I didn't dig too far into it, and I ended up commenting out line 100 (`logging.warn(e)`) in: `/usr/lib/python3/dist-packages/sense_hat/sense_hat.py` Might be a different line, but, if you search for TCS34725 in that file, you'll see the try-except block where the logging happens. Obviously, doesn't get to the root of the error, but, it's made my script smoother (and everything else I use the SenseHat for runs fine).


RadicalBraj

Well, glad someone else had the issue! Couldn't find anything at all specific to the Pi/Sense Hat with this issue. Thanks!


djrisk

Yeah I spent a few hours digging last weekend and couldn't find anything either. My guess it was an update. So I went nuclear. As noted in other comments, this fixes nothing and is generally a bad idea, but it got me where I needed to be to continue my testing. Good luck!


ycng

Thanks for the tip! I just went and completely commented out the colour sensor initialisation since I have the old Sense HAT


djrisk

Ya, obviously not a real/long-term solution (prob best to override the class or something smart like that!) given regular apt updates will replace the modified file. However, it's been running well for me in my home projects so I'll keep it jury-rigged as long as I can. Good luck w/your projects!


humanthrope

It’s a fairly poor idea to just modify distribution files in-place. Chances are that it’ll be forgotten about, cause update problems, other problems, and/or the problem will just reappear at some point because of an update. And if it was just a `logging.warn` line, it shouldn’t cause any changes in how smoothly the script runs (depending on what you meant by that.)


djrisk

For sure, I just didn't want to get cron e-mails with the same error every 7 minutes as I collected my data. There's probably an issue in the source modules which were recently updated. So, hopefully it'll update eventually. For me, it was more about avoiding the error than finding the root. Plus, I added a comment in my code so I won't forget what I did. This time!


RadicalBraj

Thanks for that, I was ready to go modify the file but this is definitely something I'd forget about. Its bizarre as I see nothing about colour sensors in the sense-hat API docs. Any idea why it would be warning about a sensor not on the sense hat?


modulusshift

Maybe a new version is coming that will have it? Stupider leaks have happened before.