Modify

Opened 16 years ago

Closed 4 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 Ryan J Ollos)

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:1 Changed 16 years ago by anonymous

The above was an attempt in trac v.11

When attempting to get this to work with trac v.10

It does not look like pymills-3.4-py2.5 ever gets loaded. sqlquery.macro then errors out with this message in trac.log.

 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.db

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

Last edited 4 years ago by Ryan J Ollos (previous) (diff)

comment:2 in reply to:  1 Changed 16 years ago by James Mills

Keywords: pymills added
Status: newassigned

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.

--JamesMills

comment:3 Changed 16 years ago by Rich

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 16 years ago by anonymous

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 4 years ago by Ryan J Ollos

Description: modified (diff)
Resolution: worksforme
Status: assignedclosed

Please try after the patch in #12023 is implemented.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain James Mills.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.