Opened 17 years ago
Closed 5 years ago
#3450 closed defect (worksforme)
sqlquery.macro can't import; no datatypes module
| Reported by: | Rich | Owned by: | James Mills |
|---|---|---|---|
| Priority: | normal | Component: | SqlQueryMacro |
| Severity: | normal | Keywords: | pymills |
| Cc: | Trac Release: | 0.11 |
Description (last modified by )
After installing this macro I am getting the following error in trac
Error: Failed to load processor SQL No macro or processor named 'SQL' found trac DEBUG log indicates this is the problem ERROR: Skipping "sqlquery.macro = sqlquery.macro": (can't import "No module named datatypes")
What is this module? I can not seem to find it.
Attachments (0)
Change History (5)
comment:2 Changed 17 years ago by
| Keywords: | pymills added |
|---|---|
| Status: | new → assigned |
Replying to anonymous:
Note: Dealing with the problems in v.11 where mod_python does not pay any attention to PYTHON_EGG_CACHE but in v.10 it does I have tired putting pymills-3.4-py2.5 in /opt/trac/plugins both as an egg and not. Permissions in the plugins tree are apache:apache
You need to install pymills in your site-packages. pymills-3.4 from the Python Cheese Shop should work fine. (I'll be releasing a new version soon).
I will also update this plugin Tue/Wed so hopefully this problem should go away. I believe I didn't put pymills in the plugin's install_requires.
comment:3 Changed 17 years ago by
Downloaded pymills-3.4.tar.gz and got this error.
# python setup.py bdist_egg
Traceback (most recent call last):
File "setup.py", line 7, in <module>
pkg = __import__(name)
Installing the 3.4 egg using easy_install this is what I got with trac v.10.4
Error: Macro SQL(select * from jobQueue) failed 'SqlQueryMacro' object has no attribute 'render_macro'
The trac.log file shows both pymills and sqlquery being loaded with no issues. This is the debug output from the log file.
Trac[formatter] ERROR: Macro SQL(select * from jobQueue) failed
Traceback (most recent call last):
File "/usr/lib/python2.5/site-packages/trac/wiki/formatter.py", line 441, in _macro_formatter
return macro.process(self.req, args, True)
File "/usr/lib/python2.5/site-packages/trac/wiki/formatter.py", line 114, in process
text = self.processor(req, text)
File "/usr/lib/python2.5/site-packages/trac/wiki/formatter.py", line 102, in _macro_processor
return self.macro_provider.render_macro(req, self.name, text)
AttributeError: 'SqlQueryMacro' object has no attribute 'render_macro'
Searching around it appears "render_macro" is depreciated? reference changeset:2483
comment:4 Changed 17 years ago by
I ran into the same problem when building in pymills-3.4, but fine in pymills. I unzipped the pymills-3.4.tar.gz and that created the directory pymills-3.4, then re-named the directory to just pymills. Now I can build and install the package in pymills.
comment:5 Changed 5 years ago by
| Description: | modified (diff) |
|---|---|
| Resolution: | → worksforme |
| Status: | assigned → closed |
Please try after the patch in #12023 is implemented.



The above was an attempt in trac v.11
When attempting to get this to work with trac v.10
Trac[loader] ERROR: Failed to load plugin sqlquery.macro from /opt/trac/plugins/SqlQuery-0.1-py2.5.egg Traceback (most recent call last): File "/usr/lib/python2.5/site-packages/trac/loader.py", line 101, in load_components entry_point.load() File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 1912, in load entry = __import__(self.module_name, globals(),globals(), ['__name__']) File "opt/trac/plugins/SqlQuery-0.1-py2.5.egg/sqlquery/macro.py", line 10, in <module> from pymills.db import Connection ImportError: No module named pymills.dbNote: Dealing with the problems in v.11 where mod_python does not pay any attention to PYTHON_EGG_CACHE but in v.10 it does I have tired putting pymills-3.4-py2.5 in /opt/trac/plugins both as an egg and not. Permissions in the plugins tree are apache:apache