Account Options

  1. Sign in
The old Google Groups will be going away soon.
Switch to the new Google Groups.
Google Groups Home
« Groups Home
sqlite3 database error
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  7 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Marcus Maximus  
View profile  
 More options Feb 13, 4:50 am
From: Marcus Maximus <marcus.pres...@gmail.com>
Date: Mon, 13 Feb 2012 01:50:12 -0800 (PST)
Local: Mon, Feb 13 2012 4:50 am
Subject: sqlite3 database error
Hey guys,

i am using sqlite3 for my django app. BUT I have problems installing
it. Here are my configs:

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.sqlite3',  # Add
'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
        'NAME': 'C:\Users\Maximus\Desktop\Webseite\Django\sqlite-shell-
win32-x86-3071000\test.db',                      # Or path to database
file if using sqlite3.
        'USER': '',                      # Not used with sqlite3.
        'PASSWORD': '',                  # Not used with sqlite3.
        'HOST': '',                      # Set to empty string for
localhost. Not used with sqlite3.
        'PORT': '',                      # Set to empty string for
default. Not used with sqlite3.
    }

}

I tried this:

>>> from django.db import connection
>>> cursor = connection.cursor()

But I got this error:

Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "C:\Python27\lib\site-packages\django\db\backends\__init__.py",
line 250,
 in cursor
    cursor = self.make_debug_cursor(self._cursor())
  File "C:\Python27\lib\site-packages\django\db\backends
\sqlite3\base.py", line
207, in _cursor
    self.connection = Database.connect(**kwargs)
OperationalError: unable to open database file

Can sb pls help me?

greetings

Maximus

PS.: I created my sqlite3 file like that:

   >sqlite3 test.db
...>
...>
...>);
...>Syntax error
   >

Can sb show me a better way to create an empty sqlite3 db file?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Babatunde Akinyanmi  
View profile  
 More options Feb 13, 7:35 am
From: Babatunde Akinyanmi <tundeba...@gmail.com>
Date: Mon, 13 Feb 2012 13:35:09 +0100
Local: Mon, Feb 13 2012 7:35 am
Subject: Re: sqlite3 database error
After specifying the path to where you want your sqlite database to be
i.e db name setting, after your syncdb, the database will be created
automatically if it doesn't already exist in the path you stated.

On 2/13/12, Marcus Maximus <marcus.pres...@gmail.com> wrote:

--
Sent from my mobile device

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
ajohnston  
View profile  
 More options Feb 13, 8:03 am
From: ajohnston <ajohnston...@gmail.com>
Date: Mon, 13 Feb 2012 05:03:30 -0800 (PST)
Local: Mon, Feb 13 2012 8:03 am
Subject: Re: sqlite3 database error
Try changing the slashes form \ to /

On Feb 13, 4:50 am, Marcus Maximus <marcus.pres...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
ajohnston  
View profile  
 More options Feb 13, 8:09 am
From: ajohnston <ajohnston...@gmail.com>
Date: Mon, 13 Feb 2012 05:09:08 -0800 (PST)
Local: Mon, Feb 13 2012 8:09 am
Subject: Re: sqlite3 database error
Sorry. To be clearer, I should have said. In your db file name:

C:\Users\Maximus\Desktop\Webseite\Django\sqlite-shell-win32-
x86-3071000\test.db

try changing the \ to /

See:
https://docs.djangoproject.com/en/dev/ref/settings/#name


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Stanwin Siow  
View profile  
 More options Feb 13, 8:10 am
From: Stanwin Siow <stanwin.kts...@gmail.com>
Date: Mon, 13 Feb 2012 21:10:24 +0800
Local: Mon, Feb 13 2012 8:10 am
Subject: Re: sqlite3 database error

Try this:

>> DATABASES = {
>>     'default': {
>>         'ENGINE': 'django.db.backends.sqlite3',  # Add
>> 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
>>         'NAME': 'test.db',                      # Or path to database
>> file if using sqlite3.
>>         'USER': '',                      # Not used with sqlite3.
>>         'PASSWORD': '',                  # Not used with sqlite3.
>>         'HOST': '',                      # Set to empty string for
>> localhost. Not used with sqlite3.
>>         'PORT': '',                      # Set to empty string for
>> default. Not used with sqlite3.
>>     }

Best Regards,

Stanwin Siow

On Feb 13, 2012, at 9:03 PM, ajohnston wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
ajohnston  
View profile  
 More options Feb 13, 8:18 am
From: ajohnston <ajohnston...@gmail.com>
Date: Mon, 13 Feb 2012 05:18:09 -0800 (PST)
Local: Mon, Feb 13 2012 8:18 am
Subject: Re: sqlite3 database error
Also 'Webseite' in your file path may be misspelled?

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Tom Evans  
View profile  
 More options Feb 13, 11:34 am
From: Tom Evans <tevans...@googlemail.com>
Date: Mon, 13 Feb 2012 16:34:46 +0000
Local: Mon, Feb 13 2012 11:34 am
Subject: Re: sqlite3 database error
On Mon, Feb 13, 2012 at 4:01 PM, Dennis Lee Bieber

<wlfr...@ix.netcom.com> wrote:
> On Mon, 13 Feb 2012 01:50:12 -0800 (PST), Marcus Maximus
> <marcus.pres...@gmail.com> wrote:

>>        'NAME': 'C:\Users\Maximus\Desktop\Webseite\Django\sqlite-shell-
>>win32-x86-3071000\test.db',                      # Or path to database

>        Is that a typo? "Webseite" and not "Website"?

Webseite is German for web-site, so probably not.

Cheers

Tom


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »