New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add configuration check for sqlite #919

Merged
merged 1 commit into from Apr 28, 2016

Conversation

Projects
None yet
2 participants
@M157q
Copy link
Contributor

M157q commented Apr 28, 2016

Some operating systems don't have sqlite3 module within python3.
without this commit, they will get unclear error message like this:

File "/usr/local/lib/python3.4/site-packages/peewee.py", line 3371, in
connect
    **self.connect_kwargs)
  File "/usr/local/lib/python3.4/site-packages/peewee.py", line 3609, in
_connect
    conn = sqlite3.connect(database, **kwargs)
AttributeError: 'NoneType' object has no attribute 'connect'

Those users who encounter this ImproperlyConfiguredError
may have to install sqlite dependencies and recompile their python3

Add configuration check for sqlite
Some operating systems don't have sqlite3 module within python3.
without this commit, they will get unclear error message like this:

```
File "/usr/local/lib/python3.4/site-packages/peewee.py", line 3371, in
connect
    **self.connect_kwargs)
  File "/usr/local/lib/python3.4/site-packages/peewee.py", line 3609, in
_connect
    conn = sqlite3.connect(database, **kwargs)
AttributeError: 'NoneType' object has no attribute 'connect'
```

Those users who encounter this ImproperlyConfiguredError
may have to install sqlite dependencies and recompile their python3
@coleifer

This comment has been minimized.

Copy link
Owner

coleifer commented Apr 28, 2016

Thanks, good idea!

@coleifer coleifer merged commit cd95035 into coleifer:master Apr 28, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@M157q M157q deleted the M157q:check-sqlite-config branch Jul 2, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment