(Recorder) invalid literal for int() with base 10:

I’m stuck and would appreciate any help you can give. I have installed MariaDB on a remote Rpi3B+. I don’t get a connection error (I did, but fixed that) but now I get an error on Recorder. I have gone through the instructions on Recorder and have ensured I have the extra files and the correct syntax. Here is the error from my log:

ERROR (Recorder) [homeassistant.components.recorder] Error during connection setup: invalid literal for int() with base 10: '' (retrying in 3 seconds)

I replaced the database to make sure it was fresh, I granted complete permissions to the user and have checked the credentials - they work fine. I have searched high and low for what may be the problem, but only one other topic was similar and their solution was to delete and replace the database.

Has anyone else added a MaraDB through a remote server and successfully connected with Recorder? How did you do it?

Note: This is not docker. My HA Core is current, running on a RPi4B and the MariaDB is running on a RPi3B+. They are on the same SSID too.

With Python2, int(str(5/2)) gives you 2. With Python3, the same gives you: ValueError: invalid literal for int() with base 10: ‘2.5’

If you need to convert some string that could contain float instead of int, you should always use the following ugly formula:

int(float(myStr))

As float(‘3.0’) and float(‘3’) give you 3.0, but int(‘3.0’) gives you the error.

Also, you can solve this error by using Python isdigit() method to check whether the value is number or not. The returns True if all the characters are digits, otherwise False .

The other way to overcome this issue is to wrap your code inside a Python try…except block to handle this error.

Thank you!