Modify

Opened 9 years ago

Last modified 9 years ago

#12094 new task

On 0.12 I get with all examples the error: AttributeError: 'Environment' object has no attribute 'db_query'

Reported by: anonymous Owned by: Chris Nelson
Priority: normal Component: TracJsGanttPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.12

Description (last modified by Ryan J Ollos)

Hello! I get this error and maybe my environment has a problem? I hope someone will give me a hint to solve this error.

Thanks a lot Michael

2014-12-05 14:02:16,016 Trac[query] DEBUG: Query SQL: SELECT t.id AS id,t.priority AS priority,t.owner AS owner,t.milestone AS milestone,t.description AS description,t.status AS status,t.summary AS summary,t.type AS type,t.time AS time,t.changetime AS changetime,priority.value AS priority_value,`blocking`.value AS `blocking`,`blockedby`.value AS `blockedby`
FROM ticket AS t
  LEFT OUTER JOIN ticket_custom AS `blocking` ON (id=`blocking`.ticket AND `blocking`.name='blocking')
  LEFT OUTER JOIN ticket_custom AS `blockedby` ON (id=`blockedby`.ticket AND `blockedby`.name='blockedby')
  LEFT OUTER JOIN enum AS priority ON (priority.type='priority' AND priority.name=priority)
ORDER BY COALESCE(priority.value,'')='',CAST(priority.value AS integer),t.id
2014-12-05 14:02:16,032 Trac[formatter] ERROR: Macro TracJSGanttChart(root=self) failed:
Traceback (most recent call last):
  File "build/bdist.linux-x86_64/egg/trac/wiki/formatter.py", line 720, in _macro_formatter
    return macro.process(args, in_paragraph=True)
  File "build/bdist.linux-x86_64/egg/trac/wiki/formatter.py", line 304, in process
    text = self.processor(text)
  File "build/bdist.linux-x86_64/egg/trac/wiki/formatter.py", line 291, in _macro_processor
    text)
  File "build/bdist.linux-x86_64/egg/tracjsgantt/tracjsgantt.py", line 739, in expand_macro
    tasks = self._add_tasks(options)
  File "build/bdist.linux-x86_64/egg/tracjsgantt/tracjsgantt.py", line 672, in _add_tasks
    self.tickets = self._query_tickets(options)
  File "build/bdist.linux-x86_64/egg/tracjsgantt/tracjsgantt.py", line 328, in _query_tickets
    rawtickets = self.pm.query(query_options, fields, self.req)
  File "build/bdist.linux-x86_64/egg/tracjsgantt/tracpm.py", line 1197, in query
    self.postQuery(options, tickets)
  File "build/bdist.linux-x86_64/egg/tracjsgantt/tracpm.py", line 1093, in postQuery
    with self.env.db_query as db:
AttributeError: 'Environment' object has no attribute 'db_query'

Attachments (0)

Change History (4)

comment:1 Changed 9 years ago by Chris Nelson

The tip of the plugin repository has been updated for the Trac 1.0 DB API. I'm sure it won't work in 0.11 and have no way of testing it in 0.12. I believe there is a note in the repo about what the last version to support 0.xx is. I suggest checking out that version and trying it to see if it fixes your problem. All the changes after that so far are about DB access. If I could figure out how to create a branch in SVN (I'm a git guy), I'd create a 0.11 branch so this was less of a problem. Sorry.

comment:2 Changed 9 years ago by Ryan J Ollos

It won't work in 0.12 either, 0.12 had a different DB API: trac:TracDev/DatabaseApi#Trac0.12API. The pre-0.12 and 0.12 DB APIs worked with Trac all the way up until 1.1.2 though.

As for the SVN challenges, I wish I could help, but knowing SVN is just something one is born with and can't be imparted ;)

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

comment:3 Changed 9 years ago by Ryan J Ollos

Description: modified (diff)

comment:4 in reply to:  2 Changed 9 years ago by anonymous

Replying to rjollos:

... As for the SVN challenges, I wish I could help, but knowing SVN is just something one is born with and can't be imparted ;)

Oh, thank gawd I'm immune! :-)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain Chris Nelson.

Add Comment


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

 
Note: See TracTickets for help on using tickets.