I2C not working on my ESP32

Hi everyone,
I’m working on an ESP32 that has to receive data from Wifi module and send them via I2C. However my device seems not working. I instantiated an object BOARD that inheritates i2c.I2C, I wrote an init() method based on i2c init, but when I do object.write() I get an InvalidHardwareStatusError.
Seeing on other discussions I read that this exception can be raised if an object.start() is not called, but this is not the case.
I leave here a piece of code.
Can you help me ? Thanks.

class BOARD(i2c.I2C):

def init(self, drvname, addr, clk):
    i2c.I2c(self, addr, i2c=drvname, clock=clk)

board = BOARD(I2C0, 0x23, 100000)

rx = sock.recv(1)
board.write(rx, timeout=1000)
rxs = scheda.read(1,timeout=1000)
except Exception as e:
print("Ops, I got an exception ", e)

Hi @Mario
Perhaps it would be better to check a working example of I2C.
in your installation directory, navigate to:
let me know if you still have errors.

Thanks for your reply.
I had already checked working examples and the code I posted was working last week.
However now all works fine, it was only an hardware problem.
Thanks for support.