# Problems with Sensehat on Pi4 with Bookworm (Python3) and NR 4.0.3 - solved

**URL:** <https://discourse.nodered.org/t/problems-with-sensehat-on-pi4-with-bookworm-python3-and-nr-4-0-3-solved/94784>\
**Category:** General\
**Created:** [21 January 2025 14:20 UTC](https://discourse.nodered.org/t/problems-with-sensehat-on-pi4-with-bookworm-python3-and-nr-4-0-3-solved/94784 "2025-01-21T14:20:30Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Detlef9](https://avatars.discourse-cdn.com/v4/letter/d/58f4c7/32.png) [@Detlef9](https://discourse.nodered.org/u/Detlef9)\
**Post date:** [21 January 2025 14:20 UTC](https://discourse.nodered.org/t/problems-with-sensehat-on-pi4-with-bookworm-python3-and-nr-4-0-3-solved/94784/1 "2025-01-21T14:20:30Z")

</div>

I had the same problem as stefan24:  
[Problems with Sensehat on Pi4 with Bookworm (Python3) and NR 4.0.3](https://discourse.nodered.org/t/problems-with-sensehat-on-pi4-with-bookworm-python3-and-nr-4-0-3/92220)

The cancellation of the connection to the sense-hat node is caused by the warning message ‘DeprecationWarning: activeCount() is deprecated ...’ in the sensehat.py file.  
In the file **sensehat.py** , the deprecated method

> activeCount()

must be replaced by the new method

> active\_count()

in line 130.

As soon as this change has been made, the connection is no longer interrupted.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [26 January 2025 10:20 UTC](https://discourse.nodered.org/t/problems-with-sensehat-on-pi4-with-bookworm-python3-and-nr-4-0-3-solved/94784/2 "2025-01-26T10:20:41Z")

</div>

Hi Paul

Thanks - will patch it later today.  
Good luck with the Norovirus - lots of it about over here at the moment as well (as well as RSV and Covid and general winter flu... quadruple whammy! ) . Hope you manage to avoid them all...  
Thanks for the update

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [26 January 2025 10:28 UTC](https://discourse.nodered.org/t/problems-with-sensehat-on-pi4-with-bookworm-python3-and-nr-4-0-3-solved/94784/3 "2025-01-26T10:28:04Z")

</div>

Published as v 0.2.0... please can you try it again to double check if you get a chance - but it was just that one line change so hopefully ok...

---

<div class="post-metadata">

**Author:** ![Detlef9](https://avatars.discourse-cdn.com/v4/letter/d/58f4c7/32.png) [@Detlef9](https://discourse.nodered.org/u/Detlef9)\
**Post date:** [26 January 2025 19:54 UTC](https://discourse.nodered.org/t/problems-with-sensehat-on-pi4-with-bookworm-python3-and-nr-4-0-3-solved/94784/4 "2025-01-26T19:54:32Z")

</div>

Hello dceejay,  
I have just replaced my old Sense Hat version 0.1.5 with the new version 0.2.0. It works as desired. Thanks for creating the new version.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [26 April 2025 19:55 UTC](https://discourse.nodered.org/t/problems-with-sensehat-on-pi4-with-bookworm-python3-and-nr-4-0-3-solved/94784/5 "2025-04-26T19:55:07Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
