Hello
I struggling with the SqlQueryMacro.
https://trac-hacks.org/wiki/SqlQueryMacro
What I want is to query a SQLite database of another TRAC instance (on
the same server).
I have this example query in my wiki:
[[SQL(SELECT * FROM component)]]
... but get the following error:
Error: Macro SQL(SELECT * FROM component) failed
This is my config:
[sqlquery]
uri = sqlite:///data/trac/repos/toolkit/db/trac.db
Call stack:
2021-03-05 23:09:48,706 Trac[formatter] DEBUG: Executing Wiki macro SQL
by provider <Component sqlquery.macro.SqlQueryMacro>
2021-03-05 23:09:48,706 Trac[formatter] ERROR: Macro SQL(SELECT * FROM
component) failed for <Resource u'wiki:WikiStart'>:
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/trac/wiki/formatter.py",
line 818, in _macro_formatter
return macro.ensure_inline(macro.process(args), in_paragraph)
File "/usr/local/lib/python2.7/dist-packages/trac/wiki/formatter.py",
line 389, in process
text = self.processor(text)
File "/usr/local/lib/python2.7/dist-packages/trac/wiki/formatter.py",
line 361, in _macro_processor
text)
File "/usr/local/lib/python2.7/dist-packages/sqlquery/macro.py", line
53, in expand_macro
db = Connection(self.uri)
File "/usr/local/lib/python2.7/dist-packages/pymills/dbapi.py", line
55, in create_connection
return types[type](*args, **kwargs)
KeyError: u'sqlite:///data/trac/repos/toolkit/db/trac.db'
I double checked the SQLite database path. It is correct.
I have TRAC 1.4.2 on Linux, with SQLite database.
Please help.
Clemens
--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/ddc7b518-31ca-3026-f0cb-70171e48fcc8%40osypkamed.com.
I struggling with the SqlQueryMacro.
https://trac-hacks.org/wiki/SqlQueryMacro
What I want is to query a SQLite database of another TRAC instance (on
the same server).
I have this example query in my wiki:
[[SQL(SELECT * FROM component)]]
... but get the following error:
Error: Macro SQL(SELECT * FROM component) failed
This is my config:
[sqlquery]
uri = sqlite:///data/trac/repos/toolkit/db/trac.db
Call stack:
2021-03-05 23:09:48,706 Trac[formatter] DEBUG: Executing Wiki macro SQL
by provider <Component sqlquery.macro.SqlQueryMacro>
2021-03-05 23:09:48,706 Trac[formatter] ERROR: Macro SQL(SELECT * FROM
component) failed for <Resource u'wiki:WikiStart'>:
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/trac/wiki/formatter.py",
line 818, in _macro_formatter
return macro.ensure_inline(macro.process(args), in_paragraph)
File "/usr/local/lib/python2.7/dist-packages/trac/wiki/formatter.py",
line 389, in process
text = self.processor(text)
File "/usr/local/lib/python2.7/dist-packages/trac/wiki/formatter.py",
line 361, in _macro_processor
text)
File "/usr/local/lib/python2.7/dist-packages/sqlquery/macro.py", line
53, in expand_macro
db = Connection(self.uri)
File "/usr/local/lib/python2.7/dist-packages/pymills/dbapi.py", line
55, in create_connection
return types[type](*args, **kwargs)
KeyError: u'sqlite:///data/trac/repos/toolkit/db/trac.db'
I double checked the SQLite database path. It is correct.
I have TRAC 1.4.2 on Linux, with SQLite database.
Please help.
Clemens
--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/ddc7b518-31ca-3026-f0cb-70171e48fcc8%40osypkamed.com.