Saturday, July 13, 2013

Re: Chapter 5 problems

bump


On Fri, Jul 12, 2013 at 4:20 PM, Randy Baxley <randy7771026@gmail.com> wrote:
randy@randy-Inspiron-530s:~/dj/mfp/mysite$ sqlite3 /home/dj/mfp/mysite/mysite/mydb.db
SQLite version 3.7.9 2011-11-01 00:52:41
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> 

but at least now I know I have SQLite3 though I did not before you asked that question.


On Fri, Jul 12, 2013 at 3:15 PM, John <john-django@martinhome.org.uk> wrote:
Can you open the file using sqlite on the command line:

# sqlite3 /home/dj/mfp/mysite/mydb.db

John


On 12/07/13 21:08, Randy Baxley wrote:
permissions for randy on mydb.db are read and write.


On Fri, Jul 12, 2013 at 3:05 PM, Jonathan Baker <jonathandavidbaker@gmail.com> wrote:
Does the file have the correct permissions?


On Fri, Jul 12, 2013 at 2:03 PM, Randy Baxley <randy7771026@gmail.com> wrote:
that has been my first and my last variations but it is still throwing the same error.


On Fri, Jul 12, 2013 at 1:55 PM, John <john-django@martinhome.org.uk> wrote:
'NAME' doesn't look like a path to a sqlite database file. I'd expect it
to look more like:

'NAME': '/home/dj/mfp/mysite/mydb.db'

John

On 12/07/13 19:33, Randy Baxley wrote:
> randy@randy-Inspiron-530s:~/dj/mfp/mysite$ python manage.py shell
> Python 2.7.3 (default, Apr 10 2013, 05:46:21)
> [GCC 4.6.3] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> (InteractiveConsole)
> >>> from django.db import connection
> >>> cursor = connection.cursor()
> Traceback (most recent call last):
>   File "<console>", line 1, in <module>
>   File
> "/usr/local/lib/python2.7/dist-packages/django/db/backends/__init__.py",
> line 324, in cursor
>     cursor = self.make_debug_cursor(self._cursor())
>   File
> "/usr/local/lib/python2.7/dist-packages/django/db/backends/sqlite3/base.py",
> line 306, in _cursor
>     self._sqlite_create_connection()
>   File
> "/usr/local/lib/python2.7/dist-packages/django/db/backends/sqlite3/base.py",
> line 296, in _sqlite_create_connection
>     self.connection = Database.connect(**kwargs)
> OperationalError: unable to open database file
> >>>
> randy@randy-Inspiron-530s:~/dj/mfp/mysite$ python manage.py validate0
> errors found
> randy@randy-Inspiron-530s:~/dj/mfp/mysite$
>
> I suspect my path and have tried several variations
>
> DATABASES = {
>     'default': {
>   #      'ENGINE': 'django.db.backends.mysql',
>         'ENGINE': 'django.db.backends.sqlite3',
>   #      'ENGINE': 'django.db.backends.', # Add 'postgresql_psycopg2',
> 'mysql', 'sqlite3' or 'oracle'.
>         'NAME': 'C:randy@randy/home/dj/mfp/mysite/mydb.db/', # Or path
> to database file if using sqlite3.
>         # The following settings are not used with sqlite3:
>         'USER': '',
>         'PASSWORD': '',
>         'HOST': '',        # Empty for localhost through domain
> sockets or '127.0.0.1' for localhost through TCP.
>         'PORT': '',                      # Set to empty string for
> default.
>     }
> --
> You received this message because you are subscribed to the Google
> Groups "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to django-users+unsubscribe@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.



--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Jonathan D. Baker
Developer
http://jonathandbaker.com
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.
 
 


--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate