Skip to content
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

problem accessing sqlite databases with full path #47

Open
sanzoghenzo opened this issue Jul 14, 2016 · 0 comments
Open

problem accessing sqlite databases with full path #47

sanzoghenzo opened this issue Jul 14, 2016 · 0 comments

Comments

@sanzoghenzo
Copy link

Hi all,
I'm trying to use the SQLReader class in python script widget to access a sqlite database placed in a different path than orange itself. Here's the code:

from Orange.data.sql import *
r = SQLReader()
r.connect('sqlite:///d:/path/to/database.db/')

and this is the log:

Running script:
Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "<string>", line 4, in <module>
  File "[...]\Orange\utils\__init__.py", line 214, in wrap_call
    return func(*args, **kwargs)
  File "[...]\Orange\data\sql.py", line 195, in connect
    (self.quirks, self.conn) = _connection(uri)
  File "[...]\Orange\data\sql.py", line 141, in _connection
    return (quirks, dbmod.connect(host))
ValueError: database parameter must be string or APSW Connection object

Looking at the source code it seem that the connection string is not treated at it should since
line 15 is handling the third slash incorrectly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant