home-assistant / hassbian-scripts

Scripts used in the Hassbian image.
Other
123 stars 98 forks source link

Python 3.7 sqlite issue #304

Closed ImNightwing closed 4 years ago

ImNightwing commented 5 years ago

Hassbian-config version

0.8.0

Suite name

python

Description of problem

after using upgrade python, my home assistant can no longer load sqlite3. Home assistant doesn't load up correctly with a default database giving me an error:
ERROR (Recorder) [homeassistant.components.recorder] Error during connection setup: No module named '_sqlite3' (retrying in 3 seconds)

Expected result

For sqlite to be configured correctly with python 3.7.2

Traceback/log

Additional info:

Landrash commented 5 years ago

I'm unable to reproduce this error.

damyanor commented 5 years ago

I'm facing the same issue. As a result recorder, history and z-wave components do not work.

2019-06-11 14:54:30 ERROR (Recorder) [homeassistant.components.recorder] Error during connection setup: No module named '_sqlite3' (retrying in 3 seconds) 2019-06-11 14:54:30 ERROR (MainThread) [homeassistant.setup] Setup failed for recorder: Component failed to initialize. 2019-06-11 14:54:32 WARNING (MainThread) [openzwave] pysqlite is not installed 2019-06-11 14:54:33 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry Z-Wave (import from configuration.yaml) for zwave Traceback (most recent call last): File "/srv/homeassistant/lib/python3.7/site-packages/openzwave/network.py", line 324, in init self.dbcon = lite.connect(os.path.join(self._options.user_path, 'pyozw.sqlite'), check_same_thread=False) NameError: name 'lite' is not defined

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/config_entries.py", line 273, in async_setup hass, self) File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/zwave/init.py", line 290, in async_setup_entry network = hass.data[DATA_NETWORK] = ZWaveNetwork(options, autostart=False) File "/srv/homeassistant/lib/python3.7/site-packages/openzwave/network.py", line 329, in init except lite.Error as e: NameError: name 'lite' is not defined 2019-06-11 14:54:33 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of history. Setup failed for dependencies: recorder 2019-06-11 14:54:33 ERROR (MainThread) [homeassistant.setup] Setup failed for history: Could not set up all dependencies.

cunninr2 commented 5 years ago

I have the same problem. It appears the Hassbian config upgrade python script compiles a new python instance without the libraries for sqllite3 (which I think is an optional compile). I think the compile in this script should have been "./configure --enable-shared --enable-loadable-sqlite-extensions". Also I cannot re-run the script because it now says the latest version of python is installed. So pretty stuck here.

Landrash commented 5 years ago

Is this by any chance a Raspian Stretch problem your having?

It that's the case I would recommend upgrading to the Buster based image.

On Sat, 6 Jul 2019, 00:10 cunninr2, notifications@github.com wrote:

I have the same problem. It appears the Hassbian config upgrade python script compiles a new python instance without the libraries for sqllite3 (which I think is an optional compile). I think the compile in this script should have been "./configure --enable-shared --enable-loadable-sqlite-extensions". Also I cannot re-run the script because it now says the latest version of python is installed. So pretty stuck here.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/home-assistant/hassbian-scripts/issues/304?email_source=notifications&email_token=AANM6CXROINL32V67JIUBVLP57BFHA5CNFSM4HWQB2PKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZKMFHY#issuecomment-508871327, or mute the thread https://github.com/notifications/unsubscribe-auth/AANM6CQENH57XZOTDHUNFD3P57BFHANCNFSM4HWQB2PA .

Landrash commented 4 years ago

https://www.home-assistant.io/blog/2019/10/26/rip-hassbian/