Bugs item #1398353, was opened at 2006-01-06 08:48
Message generated for change (Comment added) made by nobody
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1398353&group_id=74338
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: SQLite
Group: SQLObject release (specify)
Status: Closed
Resolution: Wont Fix
Priority: 5
Private: No
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: full path cannot work? SQLObject 0.7.0
Initial Comment:
I tried the following in windows XP using SQLObject
0.7.0, the path for DB is: C:\\Documents and
Settings\\guest\\My Documents\\test.db
sDBPath = os.path.abspath('test.db')
sqlhub.processConnection = connectionForURI('sqlite:%s'
% sDBPath)
it insists on having "/".
-------- exception -----------------
File "c:\program
files\python24\lib\site-packages\SQLObject-0.7.0-py2.4.egg\sqlobject\dbconnection.py",
line 80, in _parseURI
assert rest.startswith('/'), "URIs must start with
scheme:/ -- you did not include a / (in %r)" % rest
AssertionError: URIs must start with scheme:/ -- you
did not include a / (in 'C:\\Documents and
Settings\\tambrinc\\My Documents\\test.db')
------------------------------------
sqlhub.processConnection =
connectionForURI('sqlite:/%s' % sDBPath)
-------- exception -----------------
File "C:\Program
Files\Python24\Lib\site-packages\sqlite\main.py", line
445, in __init__
self.db = _sqlite.connect(database, mode)
_sqlite.DatabaseError: unable to open database file
------------------------------------
----------------------------------------------------------------------
Comment By: Nobody/Anonymous (nobody)
Date: 2008-10-28 12:20
Message:
simple fix for win32:
in dbconnection.py / class DBConnection / def _parseURI(uri):
replace
path = '/' + rest
by
path = rest
----------------------------------------------------------------------
Comment By: Nobody/Anonymous (nobody)
Date: 2008-10-28 12:19
Message:
simple fix for win32:
in dbconnection.py / class DBConnection / def _parseURI(uri):
replace
path = '/' + rest
by
path = rest
----------------------------------------------------------------------
Comment By: Oleg Broytmann (phd)
Date: 2006-01-11 17:04
Message:
Logged In: YES
user_id=4799
Yes, this is an URI. It must has forward, not backward
slashes. To convert fullpath to URI I use the following code:
cwd = os.getcwd()
cwd_uri = cwd.replace(os.sep, '/')
if os.name == 'nt':
cwd_uri = '/' + cwd_uri.replace(':', '|')
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1398353&group_id=74338
|