#8371: Windows users should use \ instead of / for file paths in settings.py
------------------------------------+---------------------------------------
Reporter: pariksheet | Owner: nobody
Status: new | Milestone:
Component: Documentation | Version: SVN
Resolution: | Keywords:
Stage: Unreviewed | Has_patch: 0
Needs_docs: 0 | Needs_tests: 0
Needs_better_patch: 0 |
------------------------------------+---------------------------------------
Old description:
> Please put a warning in settings.py or the tutorial page that Windows
> users must only use / not \ in their file paths.
>
> When trying to run the step of `python manage.py syncdb` in the tutorial
> -
> http://www.djangoproject.com/documentation/tutorial01/
> The command kept throwing the following error -
> Traceback (most recent call last):
> File "manage.py", line 11, in <module>
> execute_manager(settings)
> File "C:\Python25\Lib\site-
> packages\django\core\management\__init__.py", line
> 334, in execute_manager
> utility.execute()
> File "C:\Python25\Lib\site-
> packages\django\core\management\__init__.py", line
> 295, in execute
> self.fetch_command(subcommand).run_from_argv(self.argv)
> File "C:\Python25\Lib\site-packages\django\core\management\base.py",
> line 77,
> in run_from_argv
> self.execute(*args, **options.__dict__)
> File "C:\Python25\Lib\site-packages\django\core\management\base.py",
> line 96,
> in execute
> output = self.handle(*args, **options)
> File "C:\Python25\Lib\site-packages\django\core\management\base.py",
> line 178,
> in handle
> return self.handle_noargs(**options)
> File "C:\Python25\Lib\site-
> packages\django\core\management\commands\syncdb.py"
> , line 51, in handle_noargs
> cursor = connection.cursor()
> File "C:\Python25\Lib\site-packages\django\db\backends\__init__.py",
> line 56,
> in cursor
> cursor = self._cursor(settings)
> File "C:\Python25\Lib\site-
> packages\django\db\backends\sqlite3\base.py", line
> 144, in _cursor
> self.connection = Database.connect(**kwargs)
> sqlite3.OperationalError: unable to open database file
>
> The solution was changing the \ to / in my file path for my sqlite
> database in DATABASE_NAME of settings.py
New description:
Please put a warning in settings.py or the tutorial page that Windows
users must only use / not \ in their file paths.
When trying to run the step of `python manage.py syncdb` in the tutorial -
http://www.djangoproject.com/documentation/tutorial01/
The command kept throwing the following error -
{{{
Traceback (most recent call last):
File "manage.py", line 11, in <module>
execute_manager(settings)
File "C:\Python25\Lib\site-packages\django\core\management\__init__.py",
line
334, in execute_manager
utility.execute()
File "C:\Python25\Lib\site-packages\django\core\management\__init__.py",
line
295, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "C:\Python25\Lib\site-packages\django\core\management\base.py",
line 77,
in run_from_argv
self.execute(*args, **options.__dict__)
File "C:\Python25\Lib\site-packages\django\core\management\base.py",
line 96,
in execute
output = self.handle(*args, **options)
File "C:\Python25\Lib\site-packages\django\core\management\base.py",
line 178,
in handle
return self.handle_noargs(**options)
File "C:\Python25\Lib\site-
packages\django\core\management\commands\syncdb.py"
, line 51, in handle_noargs
cursor = connection.cursor()
File "C:\Python25\Lib\site-packages\django\db\backends\__init__.py",
line 56,
in cursor
cursor = self._cursor(settings)
File "C:\Python25\Lib\site-packages\django\db\backends\sqlite3\base.py",
line
144, in _cursor
self.connection = Database.connect(**kwargs)
sqlite3.OperationalError: unable to open database file
}}}
The solution was changing the \ to / in my file path for my sqlite
database in DATABASE_NAME of settings.py
Comment (by mtredinnick):
(Fixed description formatting)
This ticket is very confusing. The title and the description are
suggesting different changes and there's no actual of the actual setting
you were using for comparison. Please clarify what the actual problem is.
--
Ticket URL: <http://code.djangoproject.com/ticket/8371#comment:2>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---