Uncaught exception module compiled against API

Hi All,

Can anyone point me in the right direction to fix this error

Logger: root
Source: /usr/src/homeassistant/homeassistant/bootstrap.py:307
First occurred: 9:38:02 (1 occurrences)
Last logged: 9:38:02

Uncaught exception
RuntimeError: module compiled against API version 0xe but this version of numpy is 0xd

I have no idea what it means in releality, it would seem something is using an older version of numpty, how do i track it down and fix?

any help would be greatly apricated

Regards
Darren

I have the same log

Logger: root
Source: /usr/src/homeassistant/homeassistant/bootstrap.py:307
First occurred: May 4, 2021, 9:38:12 PM (1 occurrences)
Last logged: May 4, 2021, 9:38:12 PM

Uncaught exception
RuntimeError: module compiled against API version 0xe but this version of numpy is 0xd

but I also have this log which could be related but I do not now if this is related at all :confused:

Logger: root
Source: /usr/src/homeassistant/homeassistant/bootstrap.py:310
First occurred: 8:15:00 PM (1 occurrences)
Last logged: 8:15:00 PM

Uncaught thread exception
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/threading.py", line 932, in _bootstrap_inner
    self.run()
  File "/usr/local/lib/python3.8/threading.py", line 870, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/local/lib/python3.8/site-packages/paho/mqtt/client.py", line 3452, in _thread_main
    self.loop_forever(retry_first_connection=True)
  File "/usr/local/lib/python3.8/site-packages/paho/mqtt/client.py", line 1779, in loop_forever
    rc = self.loop(timeout, max_packets)
  File "/usr/local/lib/python3.8/site-packages/paho/mqtt/client.py", line 1181, in loop
    rc = self.loop_read(max_packets)
  File "/usr/local/lib/python3.8/site-packages/paho/mqtt/client.py", line 1572, in loop_read
    rc = self._packet_read()
  File "/usr/local/lib/python3.8/site-packages/paho/mqtt/client.py", line 2310, in _packet_read
    rc = self._packet_handle()
  File "/usr/local/lib/python3.8/site-packages/paho/mqtt/client.py", line 2942, in _packet_handle
    return self._handle_connack()
  File "/usr/local/lib/python3.8/site-packages/paho/mqtt/client.py", line 3029, in _handle_connack
    self.on_connect(
  File "/usr/local/lib/python3.8/site-packages/ziggonext/ziggonext.py", line 220, in _on_mqtt_client_connect
    client.connect(self._mqtt_broker, DEFAULT_PORT)
  File "/usr/local/lib/python3.8/site-packages/paho/mqtt/client.py", line 941, in connect
    return self.reconnect()
  File "/usr/local/lib/python3.8/site-packages/paho/mqtt/client.py", line 1111, in reconnect
    sock = WebsocketWrapper(sock, self._host, self._port, self._ssl,
  File "/usr/local/lib/python3.8/site-packages/paho/mqtt/client.py", line 3580, in __init__
    self._do_handshake(extra_headers)
  File "/usr/local/lib/python3.8/site-packages/paho/mqtt/client.py", line 3623, in _do_handshake
    byte = self._socket.recv(1)
  File "/usr/local/lib/python3.8/ssl.py", line 1226, in recv
    return self.read(buflen)
  File "/usr/local/lib/python3.8/ssl.py", line 1101, in read
    return self._sslobj.read(len)
ConnectionResetError: [Errno 104] Connection reset by peer

I do see the same error in my logfile:
Uncaught exception
RuntimeError: module compiled against API version 0xe but this version of numpy is 0xd

@gertha I don’t think it has something to do with your second error.
Don’t have a solution yet. But I don’t worry too much, everything works…

Same error in my log:

Logger: root
Source: /usr/src/homeassistant/homeassistant/bootstrap.py:312
First occurred: 13:54:10 (1 occurrences)
Last logged: 13:54:10

Uncaught exception
RuntimeError: module compiled against API version 0xe but this version of numpy is 0xd

I found issue Uncaught Exception 2021.4.0b0 · Issue #48565 · home-assistant/core · GitHub and PR Upgrade numpy to 1.20.2 by frenck · Pull Request #48597 · home-assistant/core · GitHub for that.

Hi All,

Thanks for the reply, the latest update (Home Assistant 2021.5.0) has taken the error away?

Regards

Unfortunately, the update didn’t solve this error for me. It’s still there!
Found someone mentioning somewhere to try ha core rebuild. It works until restarting HA, then the error is back again.

I am in the same boat - HA latest version 2021.5.0, log shows:

Logger: root
Source: /usr/src/homeassistant/homeassistant/bootstrap.py:312
First occurred: 8:09:53 AM (1 occurrences)
Last logged: 8:09:53 AM
Uncaught exception

RuntimeError: module compiled against API version 0xe but this version of numpy is 0xd
1 Like

Same error here.

Yes, same here, any way to fix this ??

Same Error in my 2021.5.1

Same with Odroid C4 HA OS

RuntimeError: module compiled against API version 0xe but this version of numpy is 0xd

Hi All,
Same error here.
Version: Home Assistant 2021.5.3 (Docker)

Logger: root
Source: /usr/src/homeassistant/homeassistant/bootstrap.py:312
First occurred: 4:05:44 PM (1 occurrences)
Last logged: 4:05:44 PM
Uncaught exception
RuntimeError: module compiled against API version 0xe but this version of numpy is 0xd

Same issue here.
Home Assistant 2021.5.4 (Docker Container).

I’m getting the same issue here too
Only occurs at start up and I’m not sure if it’s impacting on anything.

Version: core-2021.5.5
Installation Type Home Assistant OS

Upgraded core as of this morning and it didn’t fix the issue
HAOS installed on Raspberry Pi

Logger: root
Source: /usr/src/homeassistant/homeassistant/bootstrap.py:312
First occurred: 2:53:14 AM (1 occurrences)
Last logged: 2:53:14 AM

Uncaught exception
RuntimeError: module compiled against API version 0xe but this version of numpy is 0xd

Looking at the command line it appears that numpy isn’t installed

~ $ pip3 show numpy
WARNING: Package(s) not found: numpy

I think this might be getting this error because I’m using the SamsungTV Tizen integration but I can’t be certain - https://github.com/jaruba/ha-samsungtv-tizen

looking at the manifest.json and the media_player.py it does make references to numpy.

Any help with would be greatly appreciated!

Hi,
I’m not sure it related to “SamsungTV Tizen integration” as I’m also using that integration. As previously mention my error went away when I upgraded the core.

Sorry i can’t help more

Same issue here @NyQuil. I’m also using Smasungtv-tizen integration and a few other custom integrations / frontend components installed via HACS (garbage-collection, event-sensor, mini-graphs, mini-climate & mini-media-player). Running core-2021.5.5 Home Assistant OS in Proxmox on a PC.

Numpy doesn’t appeared to be installed for me either.

Hi, just to put some light to the question…

I have installed the custom component ha-samsungtv-tizen and in the manifest.json it specifies to use "numpy==1.19.2".
I don’t know how to get the installed version of numpy on my Home assistant but I think this is the clue in my case

System Health

version core-2021.6.3
installation_type Home Assistant OS
dev false
hassio true
docker true
virtualenv false
python_version 3.8.9
os_name Linux
os_version 5.4.83-v8
arch aarch64
timezone Europe/Rome

Any direction to solve this?

My error:

Logger: root
Source: /usr/src/homeassistant/homeassistant/bootstrap.py:312
First occurred: 19:54:06 (1 occurrences)
Last logged: 19:54:06

Uncaught exception
RuntimeError: module compiled against API version 0xe but this version of numpy is 0xd

I also do have the samsung tizen from Jaruba… @jaruba ?

HA itself uses numpy 1.20.x since a couple releases, so both requirements lead to a conflict.

Maybe try specifying "numpy==1.20.3" in the component manifest? That’d fix the conflict, but it might lead to some errors in the comonent itself…

EDIT: Or just remove the numpy requirement altogether. I think it will just pickup the one already installed by HA itself.

Same error.

Log Details (ERROR)
Logger: root
Source: /usr/src/homeassistant/homeassistant/bootstrap.py:312
First occurred: 9:08:32 PM (1 occurrences)
Last logged: 9:08:32 PM
Uncaught exception
RuntimeError: module compiled against API version 0xe but this version of numpy is 0xd

System Health

Version core-2021.6.6
Installation Type Home Assistant Container
Development false
Supervisor false
Docker true
Virtual Environment false
Python Version 3.8.9
Operating System Family Linux
Operating System Version 5.10.17-v7l+
CPU Architecture armv7l

I also do have the samsung tizen from Jaruba… @jaruba ?