问:
Trac Performance: DEBUG ticket_policy statements taking a long time
Edit 1: Posting trac.ini as an answer.

I have a comparatively new installation of Trac (1.0.9) on Ubuntu 16.04 running  Apache (WSGI). The current installation has less than 40 tickets. It was running alright before I installed the TimingAndEstimationPlugin with Permissions (1.5.2b).

The particular problem has come in reports. For instance, when I click the All Tickets report, following operations are completed in just two seconds.

```<code>2017-11-06 21:13:14,725 Trac[main] DEBUG: Dispatching <RequestWithSession "GET '/report/19'">
2017-11-06 21:13:14,734 Trac[session] DEBUG: Retrieving session for ID u'admin'
2017-11-06 21:13:15,170 Trac[main] DEBUG: Negotiated locale: None -> en_US
2017-11-06 21:13:15,497 Trac[api] WARNING: Unable to find repository '(default)' for synchronization
2017-11-06 21:13:15,499 Trac[ticket_policy] DEBUG: Internal: action:REPORT_VIEW, user:admin, resource:<Resource u'report:19'>, perm: <trac.perm.PermissionCache object at 0x7fab79c74b40>
2017-11-06 21:13:16,141 Trac[report] DEBUG: Report {19} with SQL "SELECT p.value AS __color__,
   id AS ticket, time AS created, summary, t.type AS type, owner, status, keywords, component, version, milestone,
   changetime AS _changetime, description AS _description,
   reporter AS _reporter
  FROM ticket t
  LEFT JOIN enum p ON p.name = t.priority AND p.type = 'priority'
  ORDER BY  ticket desc
"
2017-11-06 21:13:16,144 Trac[report] DEBUG: Request args: {'id': u'19'}
2017-11-06 21:13:16,145 Trac[report] DEBUG: Report {19} SQL (count): SELECT COUNT(*) FROM (
SELECT p.value AS __color__,
   id AS ticket, time AS created, summary, t.type AS type, owner, status, keywords, component, version, milestone,
   changetime AS _changetime, description AS _description,
   reporter AS _reporter
  FROM ticket t
  LEFT JOIN enum p ON p.name = t.priority AND p.type = 'priority'
  ORDER BY  ticket desc

) AS tab
2017-11-06 21:13:16,356 Trac[report] DEBUG: Report {19} SQL (col names): SELECT * FROM (
SELECT p.value AS __color__,
   id AS ticket, time AS created, summary, t.type AS type, owner, status, keywords, component, version, milestone,
   changetime AS _changetime, description AS _description,
   reporter AS _reporter
  FROM ticket t
  LEFT JOIN enum p ON p.name = t.priority AND p.type = 'priority'
  ORDER BY  ticket desc

) AS tab LIMIT 1
2017-11-06 21:13:16,463 Trac[report] DEBUG: [u'__color__', u'ticket', u'created', u'summary', u'type', u'owner', u'status', u'keywords', u'component', u'version', u'milestone', u'_changetime', u'_description', u'_reporter']  (^)
2017-11-06 21:13:16,464 Trac[report] DEBUG: Report {19} SQL (order + limit): SELECT p.value AS __color__,
   id AS ticket, time AS created, summary, t.type AS type, owner, status, keywords, component, version, milestone,
   changetime AS _changetime, description AS _description,
   reporter AS _reporter
  FROM ticket t
  LEFT JOIN enum p ON p.name = t.priority AND p.type = 'priority'
  ORDER BY  ticket desc
</code>```

But then it starts printing the following statements in the log that take a long time to complete.

```2017-11-06 21:13:17,944 Trac[ticket_policy] DEBUG: Internal: action:TICKET_VIEW, user:admin, resource:<Resource u'ticket:35'>, perm: <trac.perm.PermissionCache object at 0x7fab79d55780>
2017-11-06 21:13:18,573 Trac[ticket_policy] DEBUG: Internal: RESULTS for TICKET_VIEW: None
2017-11-06 21:13:18,574 Trac[ticket_policy] DEBUG: Internal: action:EMAIL_VIEW, user:admin, resource:<Resource u'ticket:35'>, perm: <trac.perm.PermissionCache object at 0x7fab79d55780>
2017-11-06 21:13:19,202 Trac[ticket_policy] DEBUG: Internal: RESULTS for EMAIL_VIEW: None
2017-11-06 21:13:19,203 Trac[ticket_policy] DEBUG: Internal: action:TICKET_VIEW, user:admin, resource:<Resource u'ticket:34'>, perm: <trac.perm.PermissionCache object at 0x7fab79d55410>
2017-11-06 21:13:19,829 Trac[ticket_policy] DEBUG: Internal: RESULTS for TICKET_VIEW: None
2017-11-06 21:13:19,830 Trac[ticket_policy] DEBUG: Internal: action:EMAIL_VIEW, user:admin, resource:<Resource u'ticket:34'>, perm: <trac.perm.PermissionCache object at 0x7fab79d55410>
2017-11-06 21:13:20,455 Trac[ticket_policy] DEBUG: Internal: RESULTS for EMAIL_VIEW: None
2017-11-06 21:13:20,457 Trac[ticket_policy] DEBUG: Internal: action:TICKET_VIEW, user:admin, resource:<Resource u'ticket:33'>, perm: <trac.perm.PermissionCache object at 0x7fab79d55500>
2017-11-06 21:13:21,083 Trac[ticket_policy] DEBUG: Internal: RESULTS for TICKET_VIEW: None
2017-11-06 21:13:21,086 Trac[ticket_policy] DEBUG: Internal: action:EMAIL_VIEW, user:admin, resource:<Resource u'ticket:33'>, perm: <trac.perm.PermissionCache object at 0x7fab79d55500>
2017-11-06 21:13:21,715 Trac[ticket_policy] DEBUG: Internal: RESULTS for EMAIL_VIEW: None
2017-11-06 21:13:21,716 Trac[ticket_policy] DEBUG: Internal: action:TICKET_VIEW, user:admin, resource:<Resource u'ticket:32'>, perm: <trac.perm.PermissionCache object at 0x7fab79d55370>
2017-11-06 21:13:22,342 Trac[ticket_policy] DEBUG: Internal: RESULTS for TICKET_VIEW: None
2017-11-06 21:13:22,342 Trac[ticket_policy] DEBUG: Internal: action:EMAIL_VIEW, user:admin, resource:<Resource u'ticket:32'>, perm: <trac.perm.PermissionCache object at 0x7fab79d55370>
2017-11-06 21:13:22,971 Trac[ticket_policy] DEBUG: Internal: RESULTS for EMAIL_VIEW: None
2017-11-06 21:13:22,972 Trac[ticket_policy] DEBUG: Internal: action:TICKET_VIEW, user:admin, resource:<Resource u'ticket:31'>, perm: <trac.perm.PermissionCache object at 0x7fab79c4d280>
2017-11-06 21:13:23,602 Trac[ticket_policy] DEBUG: Internal: RESULTS for TICKET_VIEW: None
2017-11-06 21:13:23,603 Trac[ticket_policy] DEBUG: Internal: action:EMAIL_VIEW, user:admin, resource:<Resource u'ticket:31'>, perm: <trac.perm.PermissionCache object at 0x7fab79c4d280>
2017-11-06 21:13:24,233 Trac[ticket_policy] DEBUG: Internal: RESULTS for EMAIL_VIEW: None
2017-11-06 21:13:24,234 Trac[ticket_policy] DEBUG: Internal: action:TICKET_VIEW, user:admin, resource:<Resource u'ticket:30'>, perm: <trac.perm.PermissionCache object at 0x7fab79c4d4b0>
2017-11-06 21:13:24,860 Trac[ticket_policy] DEBUG: Internal: RESULTS for TICKET_VIEW: None
2017-11-06 21:13:24,861 Trac[ticket_policy] DEBUG: Internal: action:EMAIL_VIEW, user:admin, resource:<Resource u'ticket:30'>, perm: <trac.perm.PermissionCache object at 0x7fab79c4d4b0>
2017-11-06 21:13:25,489 Trac[ticket_policy] DEBUG: Internal: RESULTS for EMAIL_VIEW: None
2017-11-06 21:13:25,490 Trac[ticket_policy] DEBUG: Internal: action:TICKET_VIEW, user:admin, resource:<Resource u'ticket:29'>, perm: <trac.perm.PermissionCache object at 0x7fab79c4d9b0>
2017-11-06 21:13:26,119 Trac[ticket_policy] DEBUG: Internal: RESULTS for TICKET_VIEW: None
2017-11-06 21:13:26,121 Trac[ticket_policy] DEBUG: Internal: action:EMAIL_VIEW, user:admin, resource:<Resource u'ticket:29'>, perm: <trac.perm.PermissionCache object at 0x7fab79c4d9b0>
2017-11-06 21:13:26,748 Trac[ticket_policy] DEBUG: Internal: RESULTS for EMAIL_VIEW: None
2017-11-06 21:13:26,750 Trac[ticket_policy] DEBUG: Internal: action:TICKET_VIEW, user:admin, resource:<Resource u'ticket:28'>, perm: <trac.perm.PermissionCache object at 0x7fab79c4da50>
2017-11-06 21:13:27,381 Trac[ticket_policy] DEBUG: Internal: RESULTS for TICKET_VIEW: None
2017-11-06 21:13:27,381 Trac[ticket_policy] DEBUG: Internal: action:EMAIL_VIEW, user:admin, resource:<Resource u'ticket:28'>, perm: <trac.perm.PermissionCache object at 0x7fab79c4da50>
2017-11-06 21:13:28,008 Trac[ticket_policy] DEBUG: Internal: RESULTS for EMAIL_VIEW: None
2017-11-06 21:13:28,009 Trac[ticket_policy] DEBUG: Internal: action:TICKET_VIEW, user:admin, resource:<Resource u'ticket:27'>, perm: <trac.perm.PermissionCache object at 0x7fab79c02910>
2017-11-06 21:13:28,637 Trac[ticket_policy] DEBUG: Internal: RESULTS for TICKET_VIEW: None
2017-11-06 21:13:28,639 Trac[ticket_policy] DEBUG: Internal: action:EMAIL_VIEW, user:admin, resource:<Resource u'ticket:27'>, perm: <trac.perm.PermissionCache object at 0x7fab79c02910>
2017-11-06 21:13:29,269 Trac[ticket_policy] DEBUG: Internal: RESULTS for EMAIL_VIEW: None
2017-11-06 21:13:29,271 Trac[ticket_policy] DEBUG: Internal: action:TICKET_VIEW, user:admin, resource:<Resource u'ticket:26'>, perm: <trac.perm.PermissionCache object at 0x7fab79c02820>
2017-11-06 21:13:29,902 Trac[ticket_policy] DEBUG: Internal: RESULTS for TICKET_VIEW: None
2017-11-06 21:13:29,904 Trac[ticket_policy] DEBUG: Internal: action:EMAIL_VIEW, user:admin, resource:<Resource u'ticket:26'>, perm: <trac.perm.PermissionCache object at 0x7fab79c02820>
2017-11-06 21:13:30,533 Trac[ticket_policy] DEBUG: Internal: RESULTS for EMAIL_VIEW: None
2017-11-06 21:13:30,537 Trac[ticket_policy] DEBUG: Internal: action:TICKET_VIEW, user:admin, resource:<Resource u'ticket:25'>, perm: <trac.perm.PermissionCache object at 0x7fab79c02500>
2017-11-06 21:13:31,169 Trac[ticket_policy] DEBUG: Internal: RESULTS for TICKET_VIEW: None
2017-11-06 21:13:31,171 Trac[ticket_policy] DEBUG: Internal: action:EMAIL_VIEW, user:admin, resource:<Resource u'ticket:25'>, perm: <trac.perm.PermissionCache object at 0x7fab79c02500>
2017-11-06 21:13:31,802 Trac[ticket_policy] DEBUG: Internal: RESULTS for EMAIL_VIEW: None
2017-11-06 21:13:31,805 Trac[ticket_policy] DEBUG: Internal: action:TICKET_VIEW, user:admin, resource:<Resource u'ticket:24'>, perm: <trac.perm.PermissionCache object at 0x7fab79c02b90>
2017-11-06 21:13:32,438 Trac[ticket_policy] DEBUG: Internal: RESULTS for TICKET_VIEW: None
2017-11-06 21:13:32,440 Trac[ticket_policy] DEBUG: Internal: action:EMAIL_VIEW, user:admin, resource:<Resource u'ticket:24'>, perm: <trac.perm.PermissionCache object at 0x7fab79c02b90>
2017-11-06 21:13:33,072 Trac[ticket_policy] DEBUG: Internal: RESULTS for EMAIL_VIEW: None
2017-11-06 21:13:33,074 Trac[ticket_policy] DEBUG: Internal: action:TICKET_VIEW, user:admin, resource:<Resource u'ticket:23'>, perm: <trac.perm.PermissionCache object at 0x7fab79c02410>
2017-11-06 21:13:33,705 Trac[ticket_policy] DEBUG: Internal: RESULTS for TICKET_VIEW: None
2017-11-06 21:13:33,707 Trac[ticket_policy] DEBUG: Internal: action:EMAIL_VIEW, user:admin, resource:<Resource u'ticket:23'>, perm: <trac.perm.PermissionCache object at 0x7fab79c02410>
2017-11-06 21:13:34,339 Trac[ticket_policy] DEBUG: Internal: RESULTS for EMAIL_VIEW: None
2017-11-06 21:13:34,341 Trac[ticket_policy] DEBUG: Internal: action:TICKET_VIEW, user:admin, resource:<Resource u'ticket:22'>, perm: <trac.perm.PermissionCache object at 0x7fab79c02190>
2017-11-06 21:13:34,972 Trac[ticket_policy] DEBUG: Internal: RESULTS for TICKET_VIEW: None
2017-11-06 21:13:34,974 Trac[ticket_policy] DEBUG: Internal: action:EMAIL_VIEW, user:admin, resource:<Resource u'ticket:22'>, perm: <trac.perm.PermissionCache object at 0x7fab79c02190>
2017-11-06 21:13:35,606 Trac[ticket_policy] DEBUG: Internal: RESULTS for EMAIL_VIEW: None
2017-11-06 21:13:35,608 Trac[ticket_policy] DEBUG: Internal: action:TICKET_VIEW, user:admin, resource:<Resource u'ticket:21'>, perm: <trac.perm.PermissionCache object at 0x7fab79c02e60>
2017-11-06 21:13:36,240 Trac[ticket_policy] DEBUG: Internal: RESULTS for TICKET_VIEW: None
2017-11-06 21:13:36,241 Trac[ticket_policy] DEBUG: Internal: action:EMAIL_VIEW, user:admin, resource:<Resource u'ticket:21'>, perm: <trac.perm.PermissionCache object at 0x7fab79c02e60>
2017-11-06 21:13:36,869 Trac[ticket_policy] DEBUG: Internal: RESULTS for EMAIL_VIEW: None
2017-11-06 21:13:36,871 Trac[ticket_policy] DEBUG: Internal: action:TICKET_VIEW, user:admin, resource:<Resource u'ticket:20'>, perm: <trac.perm.PermissionCache object at 0x7fab79c028c0>
2017-11-06 21:13:37,499 Trac[ticket_policy] DEBUG: Internal: RESULTS for TICKET_VIEW: None
2017-11-06 21:13:37,501 Trac[ticket_policy] DEBUG: Internal: action:EMAIL_VIEW, user:admin, resource:<Resource u'ticket:20'>, perm: <trac.perm.PermissionCache object at 0x7fab79c028c0>
2017-11-06 21:13:38,139 Trac[ticket_policy] DEBUG: Internal: RESULTS for EMAIL_VIEW: None
2017-11-06 21:13:38,141 Trac[ticket_policy] DEBUG: Internal: action:TICKET_VIEW, user:admin, resource:<Resource u'ticket:19'>, perm: <trac.perm.PermissionCache object at 0x7fab79c02640>
2017-11-06 21:13:38,772 Trac[ticket_policy] DEBUG: Internal: RESULTS for TICKET_VIEW: None
2017-11-06 21:13:38,774 Trac[ticket_policy] DEBUG: Internal: action:EMAIL_VIEW, user:admin, resource:<Resource u'ticket:19'>, perm: <trac.perm.PermissionCache object at 0x7fab79c02640>
2017-11-06 21:13:39,403 Trac[ticket_policy] DEBUG: Internal: RESULTS for EMAIL_VIEW: None
2017-11-06 21:13:39,405 Trac[ticket_policy] DEBUG: Internal: action:TICKET_VIEW, user:admin, resource:<Resource u'ticket:18'>, perm: <trac.perm.PermissionCache object at 0x7fab79c02b40>
2017-11-06 21:13:40,037 Trac[ticket_policy] DEBUG: Internal: RESULTS for TICKET_VIEW: None
2017-11-06 21:13:40,038 Trac[ticket_policy] DEBUG: Internal: action:EMAIL_VIEW, user:admin, resource:<Resource u'ticket:18'>, perm: <trac.perm.PermissionCache object at 0x7fab79c02b40>
2017-11-06 21:13:40,667 Trac[ticket_policy] DEBUG: Internal: RESULTS for EMAIL_VIEW: None
2017-11-06 21:13:40,668 Trac[ticket_policy] DEBUG: Internal: action:TICKET_VIEW, user:admin, resource:<Resource u'ticket:17'>, perm: <trac.perm.PermissionCache object at 0x7fab79d108c0>
2017-11-06 21:13:41,297 Trac[ticket_policy] DEBUG: Internal: RESULTS for TICKET_VIEW: None
2017-11-06 21:13:41,298 Trac[ticket_policy] DEBUG: Internal: action:EMAIL_VIEW, user:admin, resource:<Resource u'ticket:17'>, perm: <trac.perm.PermissionCache object at 0x7fab79d108c0>
2017-11-06 21:13:41,924 Trac[ticket_policy] DEBUG: Internal: RESULTS for EMAIL_VIEW: None
2017-11-06 21:13:41,925 Trac[ticket_policy] DEBUG: Internal: action:TICKET_VIEW, user:admin, resource:<Resource u'ticket:16'>, perm: <trac.perm.PermissionCache object at 0x7fab79d10a50>
2017-11-06 21:13:42,551 Trac[ticket_policy] DEBUG: Internal: RESULTS for TICKET_VIEW: None
2017-11-06 21:13:42,552 Trac[ticket_policy] DEBUG: Internal: action:EMAIL_VIEW, user:admin, resource:<Resource u'ticket:16'>, perm: <trac.perm.PermissionCache object at 0x7fab79d10a50>
2017-11-06 21:13:43,179 Trac[ticket_policy] DEBUG: Internal: RESULTS for EMAIL_VIEW: None
2017-11-06 21:13:43,181 Trac[ticket_policy] DEBUG: Internal: action:TICKET_VIEW, user:admin, resource:<Resource u'ticket:15'>, perm: <trac.perm.PermissionCache object at 0x7fab79d10af0>
2017-11-06 21:13:43,811 Trac[ticket_policy] DEBUG: Internal: RESULTS for TICKET_VIEW: None
2017-11-06 21:13:43,813 Trac[ticket_policy] DEBUG: Internal: action:EMAIL_VIEW, user:admin, resource:<Resource u'ticket:15'>, perm: <trac.perm.PermissionCache object at 0x7fab79d10af0>
2017-11-06 21:13:44,445 Trac[ticket_policy] DEBUG: Internal: RESULTS for EMAIL_VIEW: None
2017-11-06 21:13:44,447 Trac[ticket_policy] DEBUG: Internal: action:TICKET_VIEW, user:admin, resource:<Resource u'ticket:14'>, perm: <trac.perm.PermissionCache object at 0x7fab79d102d0>
2017-11-06 21:13:45,083 Trac[ticket_policy] DEBUG: Internal: RESULTS for TICKET_VIEW: None
2017-11-06 21:13:45,085 Trac[ticket_policy] DEBUG: Internal: action:EMAIL_VIEW, user:admin, resource:<Resource u'ticket:14'>, perm: <trac.perm.PermissionCache object at 0x7fab79d102d0>
2017-11-06 21:13:45,716 Trac[ticket_policy] DEBUG: Internal: RESULTS for EMAIL_VIEW: None
2017-11-06 21:13:45,718 Trac[ticket_policy] DEBUG: Internal: action:TICKET_VIEW, user:admin, resource:<Resource u'ticket:13'>, perm: <trac.perm.PermissionCache object at 0x7fab79d10230>
2017-11-06 21:13:46,352 Trac[ticket_policy] DEBUG: Internal: RESULTS for TICKET_VIEW: None
2017-11-06 21:13:46,355 Trac[ticket_policy] DEBUG: Internal: action:EMAIL_VIEW, user:admin, resource:<Resource u'ticket:13'>, perm: <trac.perm.PermissionCache object at 0x7fab79d10230>
2017-11-06 21:13:46,986 Trac[ticket_policy] DEBUG: Internal: RESULTS for EMAIL_VIEW: None
2017-11-06 21:13:46,991 Trac[ticket_policy] DEBUG: Internal: action:TICKET_VIEW, user:admin, resource:<Resource u'ticket:12'>, perm: <trac.perm.PermissionCache object at 0x7fab79d100a0>
2017-11-06 21:13:47,623 Trac[ticket_policy] DEBUG: Internal: RESULTS for TICKET_VIEW: None
2017-11-06 21:13:47,624 Trac[ticket_policy] DEBUG: Internal: action:EMAIL_VIEW, user:admin, resource:<Resource u'ticket:12'>, perm: <trac.perm.PermissionCache object at 0x7fab79d100a0>
2017-11-06 21:13:48,254 Trac[ticket_policy] DEBUG: Internal: RESULTS for EMAIL_VIEW: None
2017-11-06 21:13:48,256 Trac[ticket_policy] DEBUG: Internal: action:TICKET_VIEW, user:admin, resource:<Resource u'ticket:11'>, perm: <trac.perm.PermissionCache object at 0x7fab79d10d70>
2017-11-06 21:13:48,885 Trac[ticket_policy] DEBUG: Internal: RESULTS for TICKET_VIEW: None
2017-11-06 21:13:48,887 Trac[ticket_policy] DEBUG: Internal: action:EMAIL_VIEW, user:admin, resource:<Resource u'ticket:11'>, perm: <trac.perm.PermissionCache object at 0x7fab79d10d70>
2017-11-06 21:13:49,517 Trac[ticket_policy] DEBUG: Internal: RESULTS for EMAIL_VIEW: None
2017-11-06 21:13:49,519 Trac[ticket_policy] DEBUG: Internal: action:TICKET_VIEW, user:admin, resource:<Resource u'ticket:10'>, perm: <trac.perm.PermissionCache object at 0x7fab79d10460>
2017-11-06 21:13:50,150 Trac[ticket_policy] DEBUG: Internal: RESULTS for TICKET_VIEW: None
2017-11-06 21:13:50,152 Trac[ticket_policy] DEBUG: Internal: action:EMAIL_VIEW, user:admin, resource:<Resource u'ticket:10'>, perm: <trac.perm.PermissionCache object at 0x7fab79d10460>
2017-11-06 21:13:50,783 Trac[ticket_policy] DEBUG: Internal: RESULTS for EMAIL_VIEW: None
2017-11-06 21:13:50,785 Trac[ticket_policy] DEBUG: Internal: action:TICKET_VIEW, user:admin, resource:<Resource u'ticket:9'>, perm: <trac.perm.PermissionCache object at 0x7fab79d10c30>
2017-11-06 21:13:51,417 Trac[ticket_policy] DEBUG: Internal: RESULTS for TICKET_VIEW: None
2017-11-06 21:13:51,422 Trac[ticket_policy] DEBUG: Internal: action:EMAIL_VIEW, user:admin, resource:<Resource u'ticket:9'>, perm: <trac.perm.PermissionCache object at 0x7fab79d10c30>
2017-11-06 21:13:52,053 Trac[ticket_policy] DEBUG: Internal: RESULTS for EMAIL_VIEW: None
2017-11-06 21:13:52,055 Trac[ticket_policy] DEBUG: Internal: action:TICKET_VIEW, user:admin, resource:<Resource u'ticket:8'>, perm: <trac.perm.PermissionCache object at 0x7fab79d101e0>
2017-11-06 21:13:52,684 Trac[ticket_policy] DEBUG: Internal: RESULTS for TICKET_VIEW: None
2017-11-06 21:13:52,687 Trac[ticket_policy] DEBUG: Internal: action:EMAIL_VIEW, user:admin, resource:<Resource u'ticket:8'>, perm: <trac.perm.PermissionCache object at 0x7fab79d101e0>
2017-11-06 21:13:53,317 Trac[ticket_policy] DEBUG: Internal: RESULTS for EMAIL_VIEW: None
2017-11-06 21:13:53,320 Trac[ticket_policy] DEBUG: Internal: action:TICKET_VIEW, user:admin, resource:<Resource u'ticket:7'>, perm: <trac.perm.PermissionCache object at 0x7fab79d10500>
2017-11-06 21:13:53,950 Trac[ticket_policy] DEBUG: Internal: RESULTS for TICKET_VIEW: None
2017-11-06 21:13:53,951 Trac[ticket_policy] DEBUG: Internal: action:EMAIL_VIEW, user:admin, resource:<Resource u'ticket:7'>, perm: <trac.perm.PermissionCache object at 0x7fab79d10500>
2017-11-06 21:13:54,581 Trac[ticket_policy] DEBUG: Internal: RESULTS for EMAIL_VIEW: None
2017-11-06 21:13:54,584 Trac[ticket_policy] DEBUG: Internal: action:TICKET_VIEW, user:admin, resource:<Resource u'ticket:6'>, perm: <trac.perm.PermissionCache object at 0x7fab79d10190>
2017-11-06 21:13:55,215 Trac[ticket_policy] DEBUG: Internal: RESULTS for TICKET_VIEW: None
2017-11-06 21:13:55,216 Trac[ticket_policy] DEBUG: Internal: action:EMAIL_VIEW, user:admin, resource:<Resource u'ticket:6'>, perm: <trac.perm.PermissionCache object at 0x7fab79d10190>
2017-11-06 21:13:55,847 Trac[ticket_policy] DEBUG: Internal: RESULTS for EMAIL_VIEW: None
2017-11-06 21:13:55,849 Trac[ticket_policy] DEBUG: Internal: action:TICKET_VIEW, user:admin, resource:<Resource u'ticket:5'>, perm: <trac.perm.PermissionCache object at 0x7fab79d10640>
2017-11-06 21:13:56,482 Trac[ticket_policy] DEBUG: Internal: RESULTS for TICKET_VIEW: None
2017-11-06 21:13:56,485 Trac[ticket_policy] DEBUG: Internal: action:EMAIL_VIEW, user:admin, resource:<Resource u'ticket:5'>, perm: <trac.perm.PermissionCache object at 0x7fab79d10640>
2017-11-06 21:13:57,117 Trac[ticket_policy] DEBUG: Internal: RESULTS for EMAIL_VIEW: None
2017-11-06 21:13:57,119 Trac[ticket_policy] DEBUG: Internal: action:TICKET_VIEW, user:admin, resource:<Resource u'ticket:4'>, perm: <trac.perm.PermissionCache object at 0x7fab7a0a3690>
2017-11-06 21:13:57,748 Trac[ticket_policy] DEBUG: Internal: RESULTS for TICKET_VIEW: None
2017-11-06 21:13:57,749 Trac[ticket_policy] DEBUG: Internal: action:EMAIL_VIEW, user:admin, resource:<Resource u'ticket:4'>, perm: <trac.perm.PermissionCache object at 0x7fab7a0a3690>
2017-11-06 21:13:58,378 Trac[ticket_policy] DEBUG: Internal: RESULTS for EMAIL_VIEW: None
2017-11-06 21:13:58,380 Trac[ticket_policy] DEBUG: Internal: action:TICKET_VIEW, user:admin, resource:<Resource u'ticket:3'>, perm: <trac.perm.PermissionCache object at 0x7fab7a07df00>
2017-11-06 21:13:59,009 Trac[ticket_policy] DEBUG: Internal: RESULTS for TICKET_VIEW: None
2017-11-06 21:13:59,010 Trac[ticket_policy] DEBUG: Internal: action:EMAIL_VIEW, user:admin, resource:<Resource u'ticket:3'>, perm: <trac.perm.PermissionCache object at 0x7fab7a07df00>
2017-11-06 21:13:59,639 Trac[ticket_policy] DEBUG: Internal: RESULTS for EMAIL_VIEW: None
2017-11-06 21:13:59,640 Trac[ticket_policy] DEBUG: Internal: action:TICKET_VIEW, user:admin, resource:<Resource u'ticket:2'>, perm: <trac.perm.PermissionCache object at 0x7fab7a07d4b0>
2017-11-06 21:14:00,268 Trac[ticket_policy] DEBUG: Internal: RESULTS for TICKET_VIEW: None
2017-11-06 21:14:00,269 Trac[ticket_policy] DEBUG: Internal: action:EMAIL_VIEW, user:admin, resource:<Resource u'ticket:2'>, perm: <trac.perm.PermissionCache object at 0x7fab7a07d4b0>
2017-11-06 21:14:00,896 Trac[ticket_policy] DEBUG: Internal: RESULTS for EMAIL_VIEW: None
2017-11-06 21:14:00,898 Trac[ticket_policy] DEBUG: Internal: action:TICKET_VIEW, user:admin, resource:<Resource u'ticket:1'>, perm: <trac.perm.PermissionCache object at 0x7fab79bb3e10>
2017-11-06 21:14:01,528 Trac[ticket_policy] DEBUG: Internal: RESULTS for TICKET_VIEW: None
2017-11-06 21:14:01,530 Trac[ticket_policy] DEBUG: Internal: action:EMAIL_VIEW, user:admin, resource:<Resource u'ticket:1'>, perm: <trac.perm.PermissionCache object at 0x7fab79bb3e10>
2017-11-06 21:14:02,161 Trac[ticket_policy] DEBUG: Internal: RESULTS for EMAIL_VIEW: None
2017-11-06 21:14:02,165 Trac[chrome] DEBUG: Prepare chrome data for request
2017-11-06 21:14:02,168 Trac[ticket_policy] DEBUG: Internal: action:REPORT_VIEW, user:admin, resource:None, perm: <trac.perm.PermissionCache object at 0x7fab79c74b90>
2017-11-06 21:14:02,170 Trac[ticket_policy] DEBUG: Internal: action:TIME_VIEW, user:admin, resource:None, perm: <trac.perm.PermissionCache object at 0x7fab79c74b90>
2017-11-06 21:14:02,172 Trac[ticket_policy] DEBUG: Internal: action:TRAC_ADMIN, user:admin, resource:<Resource u'admin:general/basics'>, perm: <trac.perm.PermissionCache object at 0x7fab79fc41e0>
2017-11-06 21:14:02,173 Trac[ticket_policy] DEBUG: Internal: action:TRAC_ADMIN, user:admin, resource:<Resource u'admin:general/logging'>, perm: <trac.perm.PermissionCache object at 0x7fab7a0e9b90>
2017-11-06 21:14:02,174 Trac[ticket_policy] DEBUG: Internal: action:PERMISSION_GRANT, user:admin, resource:<Resource u'admin:general/perm'>, perm: <trac.perm.PermissionCache object at 0x7fab79fa9870>
2017-11-06 21:14:02,175 Trac[ticket_policy] DEBUG: Internal: action:TRAC_ADMIN, user:admin, resource:<Resource u'admin:general/plugin'>, perm: <trac.perm.PermissionCache object at 0x7fab79c4ebe0>
2017-11-06 21:14:02,177 Trac[ticket_policy] DEBUG: Internal: action:TICKET_ADMIN, user:admin, resource:<Resource u'admin:ticket/components'>, perm: <trac.perm.PermissionCache object at 0x7fab79c4ee10>
2017-11-06 21:14:02,178 Trac[ticket_policy] DEBUG: Internal: action:MILESTONE_VIEW, user:admin, resource:<Resource u'admin:ticket/milestones'>, perm: <trac.perm.PermissionCache object at 0x7fab79c4ee10>
2017-11-06 21:14:02,179 Trac[ticket_policy] DEBUG: Internal: action:TICKET_ADMIN, user:admin, resource:<Resource u'admin:ticket/milestones'>, perm: <trac.perm.PermissionCache object at 0x7fab7a15b8c0>
2017-11-06 21:14:02,179 Trac[ticket_policy] DEBUG: Internal: action:TICKET_ADMIN, user:admin, resource:<Resource u'admin:ticket/versions'>, perm: <trac.perm.PermissionCache object at 0x7fab7a15b460>
2017-11-06 21:14:02,180 Trac[ticket_policy] DEBUG: Internal: action:TICKET_ADMIN, user:admin, resource:<Resource u'admin:ticket/priority'>, perm: <trac.perm.PermissionCache object at 0x7fab7a15b730>
2017-11-06 21:14:02,181 Trac[ticket_policy] DEBUG: Internal: action:TICKET_ADMIN, user:admin, resource:<Resource u'admin:ticket/resolution'>, perm: <trac.perm.PermissionCache object at 0x7fab79e868c0>
2017-11-06 21:14:02,182 Trac[ticket_policy] DEBUG: Internal: action:TICKET_ADMIN, user:admin, resource:<Resource u'admin:ticket/severity'>, perm: <trac.perm.PermissionCache object at 0x7fab79ddd8c0>
2017-11-06 21:14:02,183 Trac[ticket_policy] DEBUG: Internal: action:TICKET_ADMIN, user:admin, resource:<Resource u'admin:ticket/type'>, perm: <trac.perm.PermissionCache object at 0x7fab79dddb90>
2017-11-06 21:14:02,185 Trac[ticket_policy] DEBUG: Internal: action:SEARCH_VIEW, user:admin, resource:None, perm: <trac.perm.PermissionCache object at 0x7fab79c74b90>
2017-11-06 21:14:02,186 Trac[ticket_policy] DEBUG: Internal: action:TICKET_VIEW, user:admin, resource:None, perm: <trac.perm.PermissionCache object at 0x7fab79c74b90>
2017-11-06 21:14:02,187 Trac[ticket_policy] DEBUG: Internal: action:ROADMAP_VIEW, user:admin, resource:None, perm: <trac.perm.PermissionCache object at 0x7fab79c74b90>
2017-11-06 21:14:02,189 Trac[ticket_policy] DEBUG: Internal: action:TICKET_CREATE, user:admin, resource:None, perm: <trac.perm.PermissionCache object at 0x7fab79c74b90>
2017-11-06 21:14:02,190 Trac[ticket_policy] DEBUG: Internal: action:TIMELINE_VIEW, user:admin, resource:None, perm: <trac.perm.PermissionCache object at 0x7fab79c74b90>
2017-11-06 21:14:02,506 Trac[ticket_policy] DEBUG: Internal: action:WIKI_VIEW, user:admin, resource:<Resource u'wiki:WikiStart'>, perm: <trac.perm.PermissionCache object at 0x7fab7a0856e0>
2017-11-06 21:14:02,508 Trac[ticket_policy] DEBUG: Internal: action:WIKI_VIEW, user:admin, resource:<Resource u'wiki:TracGuide'>, perm: <trac.perm.PermissionCache object at 0x7fab7a040140>
2017-11-06 21:14:02,513 Trac[ticket_policy] DEBUG: Internal: action:REPORT_SQL_VIEW, user:admin, resource:<Resource u'report:19'>, perm: <trac.perm.PermissionCache object at 0x7fab79feffa0>
2017-11-06 21:14:02,618 Trac[ticket_policy] DEBUG: Internal: action:EMAIL_VIEW, user:admin, resource:None, perm: <trac.perm.PermissionCache object at 0x7fab79c74b90>
2017-11-06 21:14:02,720 Trac[blackmagic] DEBUG: IN BlackMagic
2017-11-06 21:14:02,721 Trac[blackmagic] DEBUG: Not a ticket returning
2017-11-06 21:14:02,721 Trac[tande_filters] DEBUG: TicketFormatFilter executing
2017-11-06 21:14:02,722 Trac[tande_filters] DEBUG: TicketFormatFilter not the correct template
2017-11-06 21:14:02,722 Trac[tande_filters] DEBUG: Not a query returning
2017-11-06 21:14:02,722 Trac[tande_filters] DEBUG: Not a timeline, returning
2017-11-06 21:14:02,723 Trac[reports_filter] DEBUG: ReportScreenFilter: About to begin filtering of billing reports without permissions
2017-11-06 21:14:02,789 Trac[reports_filter] DEBUG: ReportScreenFilter: helper: [('TEXT', u'{19} All tickets', ('/usr/lib/python2.7/dist-packages/trac/ticket/templates/report_view.html', 30, -1)), ('TEXT', u'\n        ', ('/usr/lib/python2.7/dist-packages/trac/ticket/templates/report_view.html', 30, 4))] {19} All tickets 19
2017-11-06 21:14:02,797 Trac[ticket_policy] DEBUG: Internal: action:REPORT_MODIFY, user:admin, resource:<Resource u'report:19'>, perm: <trac.perm.PermissionCache object at 0x7fab79b17be0>
2017-11-06 21:14:02,800 Trac[ticket_policy] DEBUG: Internal: action:REPORT_CREATE, user:admin, resource:<Resource u'report:19'>, perm: <trac.perm.PermissionCache object at 0x7fab79b17cd0>
2017-11-06 21:14:02,803 Trac[ticket_policy] DEBUG: Internal: action:REPORT_DELETE, user:admin, resource:<Resource u'report:19'>, perm: <trac.perm.PermissionCache object at 0x7fab79b17dc0>
2017-11-06 21:14:03,781 Trac[reports_filter] DEBUG: ReportScreenFilter: id:19, in bill: False   has perm:True
```

So it takes almost a minute from the time the request is made to showing the results. This is very frustrating and making Trac almost unusable. I guess this might be related to caching or something. Please let me know if you need more information from my installation. Thanks in advance.

答:
```<code># -*- coding: utf-8 -*-

[attachment]
max_size = 10485760
max_zip_size = 10485760
render_unsafe_content = disabled

[browser]
color_scale = enabled
downloadable_paths = /trunk,/branches/*,/tags/*
hide_properties = svk:merge
intermediate_color =
intermediate_point =
newest_color = (255, 136, 136)
oldest_color = (136, 136, 255)
oneliner_properties = trac:summary
render_unsafe_content = disabled
wiki_properties = trac:description

[changeset]
max_diff_bytes = 10000000
max_diff_files = 0
wiki_format_messages = enabled

[components]
timingandestimationplugin.stopwatch.ticketstopwatch = disabled
trac.db.mysql_backend.mysqlconnector = disabled
trac.db.sqlite_backend.sqliteconnector = disabled
trac.versioncontrol.admin.repositoryadminpanel = disabled
trac.versioncontrol.admin.versioncontroladmin = disabled
trac.versioncontrol.web_ui.main.versioncontrolui = disabled
trachtmlnotification.* = enabled
tracopt.versioncontrol.git.* = disabled
tracopt.versioncontrol.svn.* = disabled

[field settings]
billable.permission = TIME_VIEW:hide, TIME_RECORD:disable
estimatedhours.permission = TIME_RECORD:disable
fields = billable, totalhours, hours, estimatedhours, internal
hours.permission = TIME_VIEW:remove, TIME_RECORD:disable
internal.permission = TIME_RECORD:hide

[gitweb-repositories]
projects_base =
projects_list =
projects_url =
sync_per_request =

[header_logo]
alt = (please configure the [header_logo] section in trac.ini)
height = -1
link =
src = site/cropped-logo-1.png
width = -1

[inherit]
htdocs_dir =
plugins_dir =
templates_dir =

[logging]
log_file = trac.log
log_level = DEBUG
log_type = file

[mainnav]
browser.order = 4.0
newticket.order = 6.0
roadmap.order = 3.0
search.order = 7.0
tickets.order = 5.0
timeline.order = 2.0
wiki.order = 1.0

[metanav]
about.order = 5.0
help.order = 4.0
login.order = 1.0
logout.order = 2.0
prefs.order = 3.0

[milestone]
stats_provider = DefaultTicketGroupStatsProvider

[mimeviewer]
max_preview_size = 262144
mime_map = text/x-dylan:dylan,text/x-idl:ice,text/x-ada:ads:adb
mime_map_patterns = text/plain:README|INSTALL|COPYING.*
pygments_default_style = trac
pygments_modes =
tab_width = 8
treat_as_binary = application/octet-stream,application/pdf,application/postscript,application/msword,application/rtf

[notification]
admit_domains =
ambiguous_char_width = single
batch_subject_template = $prefix Batch modify: $tickets_descr
email_sender = HtmlNotificationSmtpEmailSender
ignore_domains =
mime_encoding = none
smtp_always_bcc =
smtp_always_cc =
smtp_default_domain = removed
smtp_enabled = enabled
smtp_from = removed
smtp_from_author = disabled
smtp_from_name = removed
smtp_password = removed
smtp_port = 25
smtp_replyto = removed
smtp_server = removed
smtp_subject_prefix = __default__
smtp_user = removed
ticket_subject_template = $prefix #$ticket.id: $summary
use_public_cc = disabled
use_short_addr = disabled
use_tls = disabled

[notification-subscriber]
always_notify_cc = CarbonCopySubscriber
always_notify_owner = TicketOwnerSubscriber
always_notify_previous_updater = TicketPreviousUpdatersSubscriber
always_notify_updater = TicketUpdaterSubscriber

[project]
admin =
admin_trac_url = .
descr = removed
footer = removed
icon = site/cropped-Logo-32x32.png
name = removed
url =

[query]
default_anonymous_query = status!=closed&cc~=$USER
default_query = status!=closed&owner=$USER
items_per_page = 100
ticketlink_query = ?status=!closed

[report]
items_per_page = 100
items_per_page_rss = 0

[revisionlog]
default_log_limit = 100
graph_colors = #cc0,#0c0,#0cc,#00c,#c0c,#c00

[roadmap]
stats_provider = DefaultTicketGroupStatsProvider

[search]
min_query_length = 3

[slack]
channel = #trac
fields = type,component,resolution
username = Trac-Bot
webhook = removed

[svn]
authz_file =
authz_module_name =

[ticket]
default_cc =
default_component =
default_description =
default_keywords =
default_milestone =
default_owner = < default >
default_priority = major
default_resolution = resolved
default_severity =
default_summary =
default_type = defect
default_version =
max_comment_size = 262144
max_description_size = 262144
max_summary_size = 262144
preserve_newlines = default
restrict_owner = disabled
workflow = ConfigurableTicketWorkflow

[ticket-custom]
billable = checkbox
billable.label = Billable?
billable.order = 3
billable.value = 1
branch_prefix = text
branch_prefix.label = Branch Prefix
estimatedhours = text
estimatedhours.label = Estimated Number of Hours
estimatedhours.order = 1
estimatedhours.value = 0
hours = text
hours.label = Add Hours to Ticket
hours.order = 2
hours.value = 0
internal = checkbox
internal.label = Internal?
internal.order = 5
internal.value = 0
totalhours = text
totalhours.label = Total Hours
totalhours.order = 4
totalhours.value = 0

[ticket-workflow]
accept = new,assigned,accepted,reopened -> accepted
accept.operations = set_owner_to_self
accept.permissions = TICKET_MODIFY
create = <none> -> new
create.default = 1
create_and_assign = <none> -> assigned
create_and_assign.label = assign
create_and_assign.operations = may_set_owner
create_and_assign.permissions = TICKET_MODIFY
leave = * -> *
leave.default = 1
leave.operations = leave_status
reassign = new,assigned,accepted,reopened -> assigned
reassign.operations = set_owner
reassign.permissions = TICKET_MODIFY
reopen = closed -> reopened
reopen.operations = del_resolution
reopen.permissions = TICKET_CREATE
resolve = new,assigned,accepted,reopened -> closed
resolve.operations = set_resolution
resolve.permissions = TICKET_MODIFY

[timeline]
abbreviated_messages = enabled
changeset_collapse_events = disabled
changeset_long_messages = disabled
changeset_show_files = 0
default_daysback = 30
max_daysback = 90
newticket_formatter = oneliner
ticket_show_details = disabled

[trac]
auth_cookie_lifetime = 0
auth_cookie_path =
auto_preview_timeout = 2.0
auto_reload = disabled
backup_dir = db
base_url = removed
check_auth_ip = disabled
database = removed
debug_sql = disabled
default_charset = utf-8
default_date_format =
default_dateinfo_format = relative
default_handler = WikiModule
default_language =
default_timezone =
genshi_cache_size = 128
htdocs_location =
ignore_auth_case = disabled
jquery_location =
jquery_ui_location =
jquery_ui_theme_location =
mysqldump_path = mysqldump
never_obfuscate_mailto = disabled
permission_policies = InternalTicketsPolicy,DefaultPermissionPolicy,LegacyAttachmentPolicy
permission_store = DefaultPermissionStore
pg_dump_path = pg_dump
resizable_textareas = enabled
secure_cookies = disabled
show_email_addresses = disabled
show_ip_addresses = disabled
timeout = 20
use_base_url_for_redirect = disabled
use_chunked_encoding = disabled
use_xsendfile = disabled
wiki_toolbars = enabled
xsendfile_header = X-Sendfile

[versioncontrol]
allowed_repository_dir_prefixes =
default_repository_type = git

[wiki]
ignore_missing_pages = disabled
max_size = 262144
render_unsafe_content = disabled
safe_schemes = cvs,file,ftp,git,irc,http,https,news,sftp,smb,ssh,svn,svn+ssh
split_page_names = disabled
</code>```

Body:
Edit 1: Posting trac.ini as an answer.

I have a comparatively new installation of Trac (1.0.9) on Ubuntu 16.04 running  Apache (WSGI). The current installation has less than 40 tickets. It was running alright before I installed the TimingAndEstimationPlugin with Permissions (1.5.2b).

The particular problem has come in reports. For instance, when I click the All Tickets report, following operations are completed in just two seconds.

2017-11-06 21:13:14,725 Trac[main] DEBUG: Dispatching <RequestWithSession "GET '/report/19'">
2017-11-06 21:13:14,734 Trac[session] DEBUG: Retrieving session for ID u'admin'
2017-11-06 21:13:15,170 Trac[main] DEBUG: Negotiated locale: None -> en_US
2017-11-06 21:13:15,497 Trac[api] WARNING: Unable to find repository '(default)' for synchronization
2017-11-06 21:13:15,499 Trac[ticket_policy] DEBUG: Internal: action:REPORT_VIEW, user:admin, resource:<Resource u'report:19'>, perm: <trac.perm.PermissionCache object at 0x7fab79c74b40>
2017-11-06 21:13:16,141 Trac[report] DEBUG: Report {19} with SQL "SELECT p.value AS __color__,
   id AS ticket, time AS created, summary, t.type AS type, owner, status, keywords, component, version, milestone,
   changetime AS _changetime, description AS _description,
   reporter AS _reporter
  FROM ticket t
  LEFT JOIN enum p ON p.name = t.priority AND p.type = 'priority'
  ORDER BY  ticket desc
"
2017-11-06 21:13:16,144 Trac[report] DEBUG: Request args: {'id': u'19'}
2017-11-06 21:13:16,145 Trac[report] DEBUG: Report {19} SQL (count): SELECT COUNT(*) FROM (
SELECT p.value AS __color__,
   id AS ticket, time AS created, summary, t.type AS type, owner, status, keywords, component, version, milestone,
   changetime AS _changetime, description AS _description,
   reporter AS _reporter
  FROM ticket t
  LEFT JOIN enum p ON p.name = t.priority AND p.type = 'priority'
  ORDER BY  ticket desc

) AS tab
2017-11-06 21:13:16,356 Trac[report] DEBUG: Report {19} SQL (col names): SELECT * FROM (
SELECT p.value AS __color__,
   id AS ticket, time AS created, summary, t.type AS type, owner, status, keywords, component, version, milestone,
   changetime AS _changetime, description AS _description,
   reporter AS _reporter
  FROM ticket t
  LEFT JOIN enum p ON p.name = t.priority AND p.type = 'priority'
  ORDER BY  ticket desc

) AS tab LIMIT 1
2017-11-06 21:13:16,463 Trac[report] DEBUG: [u'__color__', u'ticket', u'created', u'summary', u'type', u'owner', u'status', u'keywords', u'component', u'version', u'milestone', u'_changetime', u'_description', u'_reporter']  (^)
2017-11-06 21:13:16,464 Trac[report] DEBUG: Report {19} SQL (order + limit): SELECT p.value AS __color__,
   id AS ticket, time AS created, summary, t.type AS type, owner, status, keywords, component, version, milestone,
   changetime AS _changetime, description AS _description,
   reporter AS _reporter
  FROM ticket t
  LEFT JOIN enum p ON p.name = t.priority AND p.type = 'priority'
  ORDER BY  ticket desc

But then it starts printing the following statements in the log that take a long time to complete.

2017-11-06 21:13:17,944 Trac[ticket_policy] DEBUG: Internal: action:TICKET_VIEW, user:admin, resource:<Resource u'ticket:35'>, perm: <trac.perm.PermissionCache object at 0x7fab79d55780>
2017-11-06 21:13:18,573 Trac[ticket_policy] DEBUG: Internal: RESULTS for TICKET_VIEW: None
2017-11-06 21:13:18,574 Trac[ticket_policy] DEBUG: Internal: action:EMAIL_VIEW, user:admin, resource:<Resource u'ticket:35'>, perm: <trac.perm.PermissionCache object at 0x7fab79d55780>
2017-11-06 21:13:19,202 Trac[ticket_policy] DEBUG: Internal: RESULTS for EMAIL_VIEW: None
2017-11-06 21:13:19,203 Trac[ticket_policy] DEBUG: Internal: action:TICKET_VIEW, user:admin, resource:<Resource u'ticket:34'>, perm: <trac.perm.PermissionCache object at 0x7fab79d55410>
2017-11-06 21:13:19,829 Trac[ticket_policy] DEBUG: Internal: RESULTS for TICKET_VIEW: None
2017-11-06 21:13:19,830 Trac[ticket_policy] DEBUG: Internal: action:EMAIL_VIEW, user:admin, resource:<Resource u'ticket:34'>, perm: <trac.perm.PermissionCache object at 0x7fab79d55410>
2017-11-06 21:13:20,455 Trac[ticket_policy] DEBUG: Internal: RESULTS for EMAIL_VIEW: None
2017-11-06 21:13:20,457 Trac[ticket_policy] DEBUG: Internal: action:TICKET_VIEW, user:admin, resource:<Resource u'ticket:33'>, perm: <trac.perm.PermissionCache object at 0x7fab79d55500>
2017-11-06 21:13:21,083 Trac[ticket_policy] DEBUG: Internal: RESULTS for TICKET_VIEW: None
2017-11-06 21:13:21,086 Trac[ticket_policy] DEBUG: Internal: action:EMAIL_VIEW, user:admin, resource:<Resource u'ticket:33'>, perm: <trac.perm.PermissionCache object at 0x7fab79d55500>
2017-11-06 21:13:21,715 Trac[ticket_policy] DEBUG: Internal: RESULTS for EMAIL_VIEW: None
2017-11-06 21:13:21,716 Trac[ticket_policy] DEBUG: Internal: action:TICKET_VIEW, user:admin, resource:<Resource u'ticket:32'>, perm: <trac.perm.PermissionCache object at 0x7fab79d55370>
2017-11-06 21:13:22,342 Trac[ticket_policy] DEBUG: Internal: RESULTS for TICKET_VIEW: None
2017-11-06 21:13:22,342 Trac[ticket_policy] DEBUG: Internal: action:EMAIL_VIEW, user:admin, resource:<Resource u'ticket:32'>, perm: <trac.perm.PermissionCache object at 0x7fab79d55370>
2017-11-06 21:13:22,971 Trac[ticket_policy] DEBUG: Internal: RESULTS for EMAIL_VIEW: None
2017-11-06 21:13:22,972 Trac[ticket_policy] DEBUG: Internal: action:TICKET_VIEW, user:admin, resource:<Resource u'ticket:31'>, perm: <trac.perm.PermissionCache object at 0x7fab79c4d280>
2017-11-06 21:13:23,602 Trac[ticket_policy] DEBUG: Internal: RESULTS for TICKET_VIEW: None
2017-11-06 21:13:23,603 Trac[ticket_policy] DEBUG: Internal: action:EMAIL_VIEW, user:admin, resource:<Resource u'ticket:31'>, perm: <trac.perm.PermissionCache object at 0x7fab79c4d280>
2017-11-06 21:13:24,233 Trac[ticket_policy] DEBUG: Internal: RESULTS for EMAIL_VIEW: None
2017-11-06 21:13:24,234 Trac[ticket_policy] DEBUG: Internal: action:TICKET_VIEW, user:admin, resource:<Resource u'ticket:30'>, perm: <trac.perm.PermissionCache object at 0x7fab79c4d4b0>
2017-11-06 21:13:24,860 Trac[ticket_policy] DEBUG: Internal: RESULTS for TICKET_VIEW: None
2017-11-06 21:13:24,861 Trac[ticket_policy] DEBUG: Internal: action:EMAIL_VIEW, user:admin, resource:<Resource u'ticket:30'>, perm: <trac.perm.PermissionCache object at 0x7fab79c4d4b0>
2017-11-06 21:13:25,489 Trac[ticket_policy] DEBUG: Internal: RESULTS for EMAIL_VIEW: None
2017-11-06 21:13:25,490 Trac[ticket_policy] DEBUG: Internal: action:TICKET_VIEW, user:admin, resource:<Resource u'ticket:29'>, perm: <trac.perm.PermissionCache object at 0x7fab79c4d9b0>
2017-11-06 21:13:26,119 Trac[ticket_policy] DEBUG: Internal: RESULTS for TICKET_VIEW: None
2017-11-06 21:13:26,121 Trac[ticket_policy] DEBUG: Internal: action:EMAIL_VIEW, user:admin, resource:<Resource u'ticket:29'>, perm: <trac.perm.PermissionCache object at 0x7fab79c4d9b0>
2017-11-06 21:13:26,748 Trac[ticket_policy] DEBUG: Internal: RESULTS for EMAIL_VIEW: None
2017-11-06 21:13:26,750 Trac[ticket_policy] DEBUG: Internal: action:TICKET_VIEW, user:admin, resource:<Resource u'ticket:28'>, perm: <trac.perm.PermissionCache object at 0x7fab79c4da50>
2017-11-06 21:13:27,381 Trac[ticket_policy] DEBUG: Internal: RESULTS for TICKET_VIEW: None
2017-11-06 21:13:27,381 Trac[ticket_policy] DEBUG: Internal: action:EMAIL_VIEW, user:admin, resource:<Resource u'ticket:28'>, perm: <trac.perm.PermissionCache object at 0x7fab79c4da50>
2017-11-06 21:13:28,008 Trac[ticket_policy] DEBUG: Internal: RESULTS for EMAIL_VIEW: None
2017-11-06 21:13:28,009 Trac[ticket_policy] DEBUG: Internal: action:TICKET_VIEW, user:admin, resource:<Resource u'ticket:27'>, perm: <trac.perm.PermissionCache object at 0x7fab79c02910>
2017-11-06 21:13:28,637 Trac[ticket_policy] DEBUG: Internal: RESULTS for TICKET_VIEW: None
2017-11-06 21:13:28,639 Trac[ticket_policy] DEBUG: Internal: action:EMAIL_VIEW, user:admin, resource:<Resource u'ticket:27'>, perm: <trac.perm.PermissionCache object at 0x7fab79c02910>
2017-11-06 21:13:29,269 Trac[ticket_policy] DEBUG: Internal: RESULTS for EMAIL_VIEW: None
2017-11-06 21:13:29,271 Trac[ticket_policy] DEBUG: Internal: action:TICKET_VIEW, user:admin, resource:<Resource u'ticket:26'>, perm: <trac.perm.PermissionCache object at 0x7fab79c02820>
2017-11-06 21:13:29,902 Trac[ticket_policy] DEBUG: Internal: RESULTS for TICKET_VIEW: None
2017-11-06 21:13:29,904 Trac[ticket_policy] DEBUG: Internal: action:EMAIL_VIEW, user:admin, resource:<Resource u'ticket:26'>, perm: <trac.perm.PermissionCache object at 0x7fab79c02820>
2017-11-06 21:13:30,533 Trac[ticket_policy] DEBUG: Internal: RESULTS for EMAIL_VIEW: None
2017-11-06 21:13:30,537 Trac[ticket_policy] DEBUG: Internal: action:TICKET_VIEW, user:admin, resource:<Resource u'ticket:25'>, perm: <trac.perm.PermissionCache object at 0x7fab79c02500>
2017-11-06 21:13:31,169 Trac[ticket_policy] DEBUG: Internal: RESULTS for TICKET_VIEW: None
2017-11-06 21:13:31,171 Trac[ticket_policy] DEBUG: Internal: action:EMAIL_VIEW, user:admin, resource:<Resource u'ticket:25'>, perm: <trac.perm.PermissionCache object at 0x7fab79c02500>
2017-11-06 21:13:31,802 Trac[ticket_policy] DEBUG: Internal: RESULTS for EMAIL_VIEW: None
2017-11-06 21:13:31,805 Trac[ticket_policy] DEBUG: Internal: action:TICKET_VIEW, user:admin, resource:<Resource u'ticket:24'>, perm: <trac.perm.PermissionCache object at 0x7fab79c02b90>
2017-11-06 21:13:32,438 Trac[ticket_policy] DEBUG: Internal: RESULTS for TICKET_VIEW: None
2017-11-06 21:13:32,440 Trac[ticket_policy] DEBUG: Internal: action:EMAIL_VIEW, user:admin, resource:<Resource u'ticket:24'>, perm: <trac.perm.PermissionCache object at 0x7fab79c02b90>
2017-11-06 21:13:33,072 Trac[ticket_policy] DEBUG: Internal: RESULTS for EMAIL_VIEW: None
2017-11-06 21:13:33,074 Trac[ticket_policy] DEBUG: Internal: action:TICKET_VIEW, user:admin, resource:<Resource u'ticket:23'>, perm: <trac.perm.PermissionCache object at 0x7fab79c02410>
2017-11-06 21:13:33,705 Trac[ticket_policy] DEBUG: Internal: RESULTS for TICKET_VIEW: None
2017-11-06 21:13:33,707 Trac[ticket_policy] DEBUG: Internal: action:EMAIL_VIEW, user:admin, resource:<Resource u'ticket:23'>, perm: <trac.perm.PermissionCache object at 0x7fab79c02410>
2017-11-06 21:13:34,339 Trac[ticket_policy] DEBUG: Internal: RESULTS for EMAIL_VIEW: None
2017-11-06 21:13:34,341 Trac[ticket_policy] DEBUG: Internal: action:TICKET_VIEW, user:admin, resource:<Resource u'ticket:22'>, perm: <trac.perm.PermissionCache object at 0x7fab79c02190>
2017-11-06 21:13:34,972 Trac[ticket_policy] DEBUG: Internal: RESULTS for TICKET_VIEW: None
2017-11-06 21:13:34,974 Trac[ticket_policy] DEBUG: Internal: action:EMAIL_VIEW, user:admin, resource:<Resource u'ticket:22'>, perm: <trac.perm.PermissionCache object at 0x7fab79c02190>
2017-11-06 21:13:35,606 Trac[ticket_policy] DEBUG: Internal: RESULTS for EMAIL_VIEW: None
2017-11-06 21:13:35,608 Trac[ticket_policy] DEBUG: Internal: action:TICKET_VIEW, user:admin, resource:<Resource u'ticket:21'>, perm: <trac.perm.PermissionCache object at 0x7fab79c02e60>
2017-11-06 21:13:36,240 Trac[ticket_policy] DEBUG: Internal: RESULTS for TICKET_VIEW: None
2017-11-06 21:13:36,241 Trac[ticket_policy] DEBUG: Internal: action:EMAIL_VIEW, user:admin, resource:<Resource u'ticket:21'>, perm: <trac.perm.PermissionCache object at 0x7fab79c02e60>
2017-11-06 21:13:36,869 Trac[ticket_policy] DEBUG: Internal: RESULTS for EMAIL_VIEW: None
2017-11-06 21:13:36,871 Trac[ticket_policy] DEBUG: Internal: action:TICKET_VIEW, user:admin, resource:<Resource u'ticket:20'>, perm: <trac.perm.PermissionCache object at 0x7fab79c028c0>
2017-11-06 21:13:37,499 Trac[ticket_policy] DEBUG: Internal: RESULTS for TICKET_VIEW: None
2017-11-06 21:13:37,501 Trac[ticket_policy] DEBUG: Internal: action:EMAIL_VIEW, user:admin, resource:<Resource u'ticket:20'>, perm: <trac.perm.PermissionCache object at 0x7fab79c028c0>
2017-11-06 21:13:38,139 Trac[ticket_policy] DEBUG: Internal: RESULTS for EMAIL_VIEW: None
2017-11-06 21:13:38,141 Trac[ticket_policy] DEBUG: Internal: action:TICKET_VIEW, user:admin, resource:<Resource u'ticket:19'>, perm: <trac.perm.PermissionCache object at 0x7fab79c02640>
2017-11-06 21:13:38,772 Trac[ticket_policy] DEBUG: Internal: RESULTS for TICKET_VIEW: None
2017-11-06 21:13:38,774 Trac[ticket_policy] DEBUG: Internal: action:EMAIL_VIEW, user:admin, resource:<Resource u'ticket:19'>, perm: <trac.perm.PermissionCache object at 0x7fab79c02640>
2017-11-06 21:13:39,403 Trac[ticket_policy] DEBUG: Internal: RESULTS for EMAIL_VIEW: None
2017-11-06 21:13:39,405 Trac[ticket_policy] DEBUG: Internal: action:TICKET_VIEW, user:admin, resource:<Resource u'ticket:18'>, perm: <trac.perm.PermissionCache object at 0x7fab79c02b40>
2017-11-06 21:13:40,037 Trac[ticket_policy] DEBUG: Internal: RESULTS for TICKET_VIEW: None
2017-11-06 21:13:40,038 Trac[ticket_policy] DEBUG: Internal: action:EMAIL_VIEW, user:admin, resource:<Resource u'ticket:18'>, perm: <trac.perm.PermissionCache object at 0x7fab79c02b40>
2017-11-06 21:13:40,667 Trac[ticket_policy] DEBUG: Internal: RESULTS for EMAIL_VIEW: None
2017-11-06 21:13:40,668 Trac[ticket_policy] DEBUG: Internal: action:TICKET_VIEW, user:admin, resource:<Resource u'ticket:17'>, perm: <trac.perm.PermissionCache object at 0x7fab79d108c0>
2017-11-06 21:13:41,297 Trac[ticket_policy] DEBUG: Internal: RESULTS for TICKET_VIEW: None
2017-11-06 21:13:41,298 Trac[ticket_policy] DEBUG: Internal: action:EMAIL_VIEW, user:admin, resource:<Resource u'ticket:17'>, perm: <trac.perm.PermissionCache object at 0x7fab79d108c0>
2017-11-06 21:13:41,924 Trac[ticket_policy] DEBUG: Internal: RESULTS for EMAIL_VIEW: None
2017-11-06 21:13:41,925 Trac[ticket_policy] DEBUG: Internal: action:TICKET_VIEW, user:admin, resource:<Resource u'ticket:16'>, perm: <trac.perm.PermissionCache object at 0x7fab79d10a50>
2017-11-06 21:13:42,551 Trac[ticket_policy] DEBUG: Internal: RESULTS for TICKET_VIEW: None
2017-11-06 21:13:42,552 Trac[ticket_policy] DEBUG: Internal: action:EMAIL_VIEW, user:admin, resource:<Resource u'ticket:16'>, perm: <trac.perm.PermissionCache object at 0x7fab79d10a50>
2017-11-06 21:13:43,179 Trac[ticket_policy] DEBUG: Internal: RESULTS for EMAIL_VIEW: None
2017-11-06 21:13:43,181 Trac[ticket_policy] DEBUG: Internal: action:TICKET_VIEW, user:admin, resource:<Resource u'ticket:15'>, perm: <trac.perm.PermissionCache object at 0x7fab79d10af0>
2017-11-06 21:13:43,811 Trac[ticket_policy] DEBUG: Internal: RESULTS for TICKET_VIEW: None
2017-11-06 21:13:43,813 Trac[ticket_policy] DEBUG: Internal: action:EMAIL_VIEW, user:admin, resource:<Resource u'ticket:15'>, perm: <trac.perm.PermissionCache object at 0x7fab79d10af0>
2017-11-06 21:13:44,445 Trac[ticket_policy] DEBUG: Internal: RESULTS for EMAIL_VIEW: None
2017-11-06 21:13:44,447 Trac[ticket_policy] DEBUG: Internal: action:TICKET_VIEW, user:admin, resource:<Resource u'ticket:14'>, perm: <trac.perm.PermissionCache object at 0x7fab79d102d0>
2017-11-06 21:13:45,083 Trac[ticket_policy] DEBUG: Internal: RESULTS for TICKET_VIEW: None
2017-11-06 21:13:45,085 Trac[ticket_policy] DEBUG: Internal: action:EMAIL_VIEW, user:admin, resource:<Resource u'ticket:14'>, perm: <trac.perm.PermissionCache object at 0x7fab79d102d0>
2017-11-06 21:13:45,716 Trac[ticket_policy] DEBUG: Internal: RESULTS for EMAIL_VIEW: None
2017-11-06 21:13:45,718 Trac[ticket_policy] DEBUG: Internal: action:TICKET_VIEW, user:admin, resource:<Resource u'ticket:13'>, perm: <trac.perm.PermissionCache object at 0x7fab79d10230>
2017-11-06 21:13:46,352 Trac[ticket_policy] DEBUG: Internal: RESULTS for TICKET_VIEW: None
2017-11-06 21:13:46,355 Trac[ticket_policy] DEBUG: Internal: action:EMAIL_VIEW, user:admin, resource:<Resource u'ticket:13'>, perm: <trac.perm.PermissionCache object at 0x7fab79d10230>
2017-11-06 21:13:46,986 Trac[ticket_policy] DEBUG: Internal: RESULTS for EMAIL_VIEW: None
2017-11-06 21:13:46,991 Trac[ticket_policy] DEBUG: Internal: action:TICKET_VIEW, user:admin, resource:<Resource u'ticket:12'>, perm: <trac.perm.PermissionCache object at 0x7fab79d100a0>
2017-11-06 21:13:47,623 Trac[ticket_policy] DEBUG: Internal: RESULTS for TICKET_VIEW: None
2017-11-06 21:13:47,624 Trac[ticket_policy] DEBUG: Internal: action:EMAIL_VIEW, user:admin, resource:<Resource u'ticket:12'>, perm: <trac.perm.PermissionCache object at 0x7fab79d100a0>
2017-11-06 21:13:48,254 Trac[ticket_policy] DEBUG: Internal: RESULTS for EMAIL_VIEW: None
2017-11-06 21:13:48,256 Trac[ticket_policy] DEBUG: Internal: action:TICKET_VIEW, user:admin, resource:<Resource u'ticket:11'>, perm: <trac.perm.PermissionCache object at 0x7fab79d10d70>
2017-11-06 21:13:48,885 Trac[ticket_policy] DEBUG: Internal: RESULTS for TICKET_VIEW: None
2017-11-06 21:13:48,887 Trac[ticket_policy] DEBUG: Internal: action:EMAIL_VIEW, user:admin, resource:<Resource u'ticket:11'>, perm: <trac.perm.PermissionCache object at 0x7fab79d10d70>
2017-11-06 21:13:49,517 Trac[ticket_policy] DEBUG: Internal: RESULTS for EMAIL_VIEW: None
2017-11-06 21:13:49,519 Trac[ticket_policy] DEBUG: Internal: action:TICKET_VIEW, user:admin, resource:<Resource u'ticket:10'>, perm: <trac.perm.PermissionCache object at 0x7fab79d10460>
2017-11-06 21:13:50,150 Trac[ticket_policy] DEBUG: Internal: RESULTS for TICKET_VIEW: None
2017-11-06 21:13:50,152 Trac[ticket_policy] DEBUG: Internal: action:EMAIL_VIEW, user:admin, resource:<Resource u'ticket:10'>, perm: <trac.perm.PermissionCache object at 0x7fab79d10460>
2017-11-06 21:13:50,783 Trac[ticket_policy] DEBUG: Internal: RESULTS for EMAIL_VIEW: None
2017-11-06 21:13:50,785 Trac[ticket_policy] DEBUG: Internal: action:TICKET_VIEW, user:admin, resource:<Resource u'ticket:9'>, perm: <trac.perm.PermissionCache object at 0x7fab79d10c30>
2017-11-06 21:13:51,417 Trac[ticket_policy] DEBUG: Internal: RESULTS for TICKET_VIEW: None
2017-11-06 21:13:51,422 Trac[ticket_policy] DEBUG: Internal: action:EMAIL_VIEW, user:admin, resource:<Resource u'ticket:9'>, perm: <trac.perm.PermissionCache object at 0x7fab79d10c30>
2017-11-06 21:13:52,053 Trac[ticket_policy] DEBUG: Internal: RESULTS for EMAIL_VIEW: None
2017-11-06 21:13:52,055 Trac[ticket_policy] DEBUG: Internal: action:TICKET_VIEW, user:admin, resource:<Resource u'ticket:8'>, perm: <trac.perm.PermissionCache object at 0x7fab79d101e0>
2017-11-06 21:13:52,684 Trac[ticket_policy] DEBUG: Internal: RESULTS for TICKET_VIEW: None
2017-11-06 21:13:52,687 Trac[ticket_policy] DEBUG: Internal: action:EMAIL_VIEW, user:admin, resource:<Resource u'ticket:8'>, perm: <trac.perm.PermissionCache object at 0x7fab79d101e0>
2017-11-06 21:13:53,317 Trac[ticket_policy] DEBUG: Internal: RESULTS for EMAIL_VIEW: None
2017-11-06 21:13:53,320 Trac[ticket_policy] DEBUG: Internal: action:TICKET_VIEW, user:admin, resource:<Resource u'ticket:7'>, perm: <trac.perm.PermissionCache object at 0x7fab79d10500>
2017-11-06 21:13:53,950 Trac[ticket_policy] DEBUG: Internal: RESULTS for TICKET_VIEW: None
2017-11-06 21:13:53,951 Trac[ticket_policy] DEBUG: Internal: action:EMAIL_VIEW, user:admin, resource:<Resource u'ticket:7'>, perm: <trac.perm.PermissionCache object at 0x7fab79d10500>
2017-11-06 21:13:54,581 Trac[ticket_policy] DEBUG: Internal: RESULTS for EMAIL_VIEW: None
2017-11-06 21:13:54,584 Trac[ticket_policy] DEBUG: Internal: action:TICKET_VIEW, user:admin, resource:<Resource u'ticket:6'>, perm: <trac.perm.PermissionCache object at 0x7fab79d10190>
2017-11-06 21:13:55,215 Trac[ticket_policy] DEBUG: Internal: RESULTS for TICKET_VIEW: None
2017-11-06 21:13:55,216 Trac[ticket_policy] DEBUG: Internal: action:EMAIL_VIEW, user:admin, resource:<Resource u'ticket:6'>, perm: <trac.perm.PermissionCache object at 0x7fab79d10190>
2017-11-06 21:13:55,847 Trac[ticket_policy] DEBUG: Internal: RESULTS for EMAIL_VIEW: None
2017-11-06 21:13:55,849 Trac[ticket_policy] DEBUG: Internal: action:TICKET_VIEW, user:admin, resource:<Resource u'ticket:5'>, perm: <trac.perm.PermissionCache object at 0x7fab79d10640>
2017-11-06 21:13:56,482 Trac[ticket_policy] DEBUG: Internal: RESULTS for TICKET_VIEW: None
2017-11-06 21:13:56,485 Trac[ticket_policy] DEBUG: Internal: action:EMAIL_VIEW, user:admin, resource:<Resource u'ticket:5'>, perm: <trac.perm.PermissionCache object at 0x7fab79d10640>
2017-11-06 21:13:57,117 Trac[ticket_policy] DEBUG: Internal: RESULTS for EMAIL_VIEW: None
2017-11-06 21:13:57,119 Trac[ticket_policy] DEBUG: Internal: action:TICKET_VIEW, user:admin, resource:<Resource u'ticket:4'>, perm: <trac.perm.PermissionCache object at 0x7fab7a0a3690>
2017-11-06 21:13:57,748 Trac[ticket_policy] DEBUG: Internal: RESULTS for TICKET_VIEW: None
2017-11-06 21:13:57,749 Trac[ticket_policy] DEBUG: Internal: action:EMAIL_VIEW, user:admin, resource:<Resource u'ticket:4'>, perm: <trac.perm.PermissionCache object at 0x7fab7a0a3690>
2017-11-06 21:13:58,378 Trac[ticket_policy] DEBUG: Internal: RESULTS for EMAIL_VIEW: None
2017-11-06 21:13:58,380 Trac[ticket_policy] DEBUG: Internal: action:TICKET_VIEW, user:admin, resource:<Resource u'ticket:3'>, perm: <trac.perm.PermissionCache object at 0x7fab7a07df00>
2017-11-06 21:13:59,009 Trac[ticket_policy] DEBUG: Internal: RESULTS for TICKET_VIEW: None
2017-11-06 21:13:59,010 Trac[ticket_policy] DEBUG: Internal: action:EMAIL_VIEW, user:admin, resource:<Resource u'ticket:3'>, perm: <trac.perm.PermissionCache object at 0x7fab7a07df00>
2017-11-06 21:13:59,639 Trac[ticket_policy] DEBUG: Internal: RESULTS for EMAIL_VIEW: None
2017-11-06 21:13:59,640 Trac[ticket_policy] DEBUG: Internal: action:TICKET_VIEW, user:admin, resource:<Resource u'ticket:2'>, perm: <trac.perm.PermissionCache object at 0x7fab7a07d4b0>
2017-11-06 21:14:00,268 Trac[ticket_policy] DEBUG: Internal: RESULTS for TICKET_VIEW: None
2017-11-06 21:14:00,269 Trac[ticket_policy] DEBUG: Internal: action:EMAIL_VIEW, user:admin, resource:<Resource u'ticket:2'>, perm: <trac.perm.PermissionCache object at 0x7fab7a07d4b0>
2017-11-06 21:14:00,896 Trac[ticket_policy] DEBUG: Internal: RESULTS for EMAIL_VIEW: None
2017-11-06 21:14:00,898 Trac[ticket_policy] DEBUG: Internal: action:TICKET_VIEW, user:admin, resource:<Resource u'ticket:1'>, perm: <trac.perm.PermissionCache object at 0x7fab79bb3e10>
2017-11-06 21:14:01,528 Trac[ticket_policy] DEBUG: Internal: RESULTS for TICKET_VIEW: None
2017-11-06 21:14:01,530 Trac[ticket_policy] DEBUG: Internal: action:EMAIL_VIEW, user:admin, resource:<Resource u'ticket:1'>, perm: <trac.perm.PermissionCache object at 0x7fab79bb3e10>
2017-11-06 21:14:02,161 Trac[ticket_policy] DEBUG: Internal: RESULTS for EMAIL_VIEW: None
2017-11-06 21:14:02,165 Trac[chrome] DEBUG: Prepare chrome data for request
2017-11-06 21:14:02,168 Trac[ticket_policy] DEBUG: Internal: action:REPORT_VIEW, user:admin, resource:None, perm: <trac.perm.PermissionCache object at 0x7fab79c74b90>
2017-11-06 21:14:02,170 Trac[ticket_policy] DEBUG: Internal: action:TIME_VIEW, user:admin, resource:None, perm: <trac.perm.PermissionCache object at 0x7fab79c74b90>
2017-11-06 21:14:02,172 Trac[ticket_policy] DEBUG: Internal: action:TRAC_ADMIN, user:admin, resource:<Resource u'admin:general/basics'>, perm: <trac.perm.PermissionCache object at 0x7fab79fc41e0>
2017-11-06 21:14:02,173 Trac[ticket_policy] DEBUG: Internal: action:TRAC_ADMIN, user:admin, resource:<Resource u'admin:general/logging'>, perm: <trac.perm.PermissionCache object at 0x7fab7a0e9b90>
2017-11-06 21:14:02,174 Trac[ticket_policy] DEBUG: Internal: action:PERMISSION_GRANT, user:admin, resource:<Resource u'admin:general/perm'>, perm: <trac.perm.PermissionCache object at 0x7fab79fa9870>
2017-11-06 21:14:02,175 Trac[ticket_policy] DEBUG: Internal: action:TRAC_ADMIN, user:admin, resource:<Resource u'admin:general/plugin'>, perm: <trac.perm.PermissionCache object at 0x7fab79c4ebe0>
2017-11-06 21:14:02,177 Trac[ticket_policy] DEBUG: Internal: action:TICKET_ADMIN, user:admin, resource:<Resource u'admin:ticket/components'>, perm: <trac.perm.PermissionCache object at 0x7fab79c4ee10>
2017-11-06 21:14:02,178 Trac[ticket_policy] DEBUG: Internal: action:MILESTONE_VIEW, user:admin, resource:<Resource u'admin:ticket/milestones'>, perm: <trac.perm.PermissionCache object at 0x7fab79c4ee10>
2017-11-06 21:14:02,179 Trac[ticket_policy] DEBUG: Internal: action:TICKET_ADMIN, user:admin, resource:<Resource u'admin:ticket/milestones'>, perm: <trac.perm.PermissionCache object at 0x7fab7a15b8c0>
2017-11-06 21:14:02,179 Trac[ticket_policy] DEBUG: Internal: action:TICKET_ADMIN, user:admin, resource:<Resource u'admin:ticket/versions'>, perm: <trac.perm.PermissionCache object at 0x7fab7a15b460>
2017-11-06 21:14:02,180 Trac[ticket_policy] DEBUG: Internal: action:TICKET_ADMIN, user:admin, resource:<Resource u'admin:ticket/priority'>, perm: <trac.perm.PermissionCache object at 0x7fab7a15b730>
2017-11-06 21:14:02,181 Trac[ticket_policy] DEBUG: Internal: action:TICKET_ADMIN, user:admin, resource:<Resource u'admin:ticket/resolution'>, perm: <trac.perm.PermissionCache object at 0x7fab79e868c0>
2017-11-06 21:14:02,182 Trac[ticket_policy] DEBUG: Internal: action:TICKET_ADMIN, user:admin, resource:<Resource u'admin:ticket/severity'>, perm: <trac.perm.PermissionCache object at 0x7fab79ddd8c0>
2017-11-06 21:14:02,183 Trac[ticket_policy] DEBUG: Internal: action:TICKET_ADMIN, user:admin, resource:<Resource u'admin:ticket/type'>, perm: <trac.perm.PermissionCache object at 0x7fab79dddb90>
2017-11-06 21:14:02,185 Trac[ticket_policy] DEBUG: Internal: action:SEARCH_VIEW, user:admin, resource:None, perm: <trac.perm.PermissionCache object at 0x7fab79c74b90>
2017-11-06 21:14:02,186 Trac[ticket_policy] DEBUG: Internal: action:TICKET_VIEW, user:admin, resource:None, perm: <trac.perm.PermissionCache object at 0x7fab79c74b90>
2017-11-06 21:14:02,187 Trac[ticket_policy] DEBUG: Internal: action:ROADMAP_VIEW, user:admin, resource:None, perm: <trac.perm.PermissionCache object at 0x7fab79c74b90>
2017-11-06 21:14:02,189 Trac[ticket_policy] DEBUG: Internal: action:TICKET_CREATE, user:admin, resource:None, perm: <trac.perm.PermissionCache object at 0x7fab79c74b90>
2017-11-06 21:14:02,190 Trac[ticket_policy] DEBUG: Internal: action:TIMELINE_VIEW, user:admin, resource:None, perm: <trac.perm.PermissionCache object at 0x7fab79c74b90>
2017-11-06 21:14:02,506 Trac[ticket_policy] DEBUG: Internal: action:WIKI_VIEW, user:admin, resource:<Resource u'wiki:WikiStart'>, perm: <trac.perm.PermissionCache object at 0x7fab7a0856e0>
2017-11-06 21:14:02,508 Trac[ticket_policy] DEBUG: Internal: action:WIKI_VIEW, user:admin, resource:<Resource u'wiki:TracGuide'>, perm: <trac.perm.PermissionCache object at 0x7fab7a040140>
2017-11-06 21:14:02,513 Trac[ticket_policy] DEBUG: Internal: action:REPORT_SQL_VIEW, user:admin, resource:<Resource u'report:19'>, perm: <trac.perm.PermissionCache object at 0x7fab79feffa0>
2017-11-06 21:14:02,618 Trac[ticket_policy] DEBUG: Internal: action:EMAIL_VIEW, user:admin, resource:None, perm: <trac.perm.PermissionCache object at 0x7fab79c74b90>
2017-11-06 21:14:02,720 Trac[blackmagic] DEBUG: IN BlackMagic
2017-11-06 21:14:02,721 Trac[blackmagic] DEBUG: Not a ticket returning
2017-11-06 21:14:02,721 Trac[tande_filters] DEBUG: TicketFormatFilter executing
2017-11-06 21:14:02,722 Trac[tande_filters] DEBUG: TicketFormatFilter not the correct template
2017-11-06 21:14:02,722 Trac[tande_filters] DEBUG: Not a query returning
2017-11-06 21:14:02,722 Trac[tande_filters] DEBUG: Not a timeline, returning
2017-11-06 21:14:02,723 Trac[reports_filter] DEBUG: ReportScreenFilter: About to begin filtering of billing reports without permissions
2017-11-06 21:14:02,789 Trac[reports_filter] DEBUG: ReportScreenFilter: helper: [('TEXT', u'{19} All tickets', ('/usr/lib/python2.7/dist-packages/trac/ticket/templates/report_view.html', 30, -1)), ('TEXT', u'\n        ', ('/usr/lib/python2.7/dist-packages/trac/ticket/templates/report_view.html', 30, 4))] {19} All tickets 19
2017-11-06 21:14:02,797 Trac[ticket_policy] DEBUG: Internal: action:REPORT_MODIFY, user:admin, resource:<Resource u'report:19'>, perm: <trac.perm.PermissionCache object at 0x7fab79b17be0>
2017-11-06 21:14:02,800 Trac[ticket_policy] DEBUG: Internal: action:REPORT_CREATE, user:admin, resource:<Resource u'report:19'>, perm: <trac.perm.PermissionCache object at 0x7fab79b17cd0>
2017-11-06 21:14:02,803 Trac[ticket_policy] DEBUG: Internal: action:REPORT_DELETE, user:admin, resource:<Resource u'report:19'>, perm: <trac.perm.PermissionCache object at 0x7fab79b17dc0>
2017-11-06 21:14:03,781 Trac[reports_filter] DEBUG: ReportScreenFilter: id:19, in bill: False   has perm:True

So it takes almost a minute from the time the request is made to showing the results. This is very frustrating and making Trac almost unusable. I guess this might be related to caching or something. Please let me know if you need more information from my installation. Thanks in advance.


来源: stackexchange

问:
SSIS Data integration between SQL Server database to IBM AS400
Is there a way to insert data into an AS/400 library table from a SQL Server database with SSIS 2008r2? We did a test and we can see the tables in the library, but it gives an error when you click on "mappings", see image.

If we put Journalling on in the AS/400 system the columns are showing and I can make mappings. But this option is creating a lot of extra (logging) space on the AS/400 system, that we don't have or want.

Is there a way to get this work without using the Journaling option?

答:
The solution is to change the "data access mode" to a "SQL command".

Fill in by the SQL command text the following:

```<code>SELECT COLUMN_A AS COLUMN_A,
       COLUMN_B AS COLUMN_B
FROM TABLE
</code>```

And now you can access the mappings of the table in the AS/400 system/library

ContentLicense: CC BY-SA 3.0

Body:
The solution is to change the "data access mode" to a "SQL command".

Fill in by the SQL command text the following:

SELECT COLUMN_A AS COLUMN_A,
       COLUMN_B AS COLUMN_B
FROM TABLE

And now you can access the mappings of the table in the AS/400 system/library


问:
Obtain aws cli command to create RDS instance from existing database
Is there a way to automatically generate the database creation string for an empty database with settings from an existing database?

I created an AWS RDS postgresql database instance using the console in my browser.  I selected all kind of setting in my browser and launched the instance. Now I want to replicate this database (empty) with a command for programmatic use. I would like to delete the existing RDS instance so a raw command would be preferred (no reference to another RDS) but something like:

```<code>aws create-db-instance --db-name database02 --allocated-storage 200 --engine postgres etc.
</code>```

答:
You'll need to create a snapshot of the source Database, instance or cluster and then create a new database based on that snapshot. You can delete the source database after the snapshot is complete.

```<code>aws rds create-db-snapshot
    --db-snapshot-identifier mydbsnapshot
    --db-instance-identifier mydb

aws rds restore-db-instance-from-db-snapshot
    --db-instance-identifier mynewdbinstance
    --db-snapshot-identifier mydbsnapshot
</code>```

http://docs.aws.amazon.com/cli/latest/reference/rds/create-db-snapshot.html

http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_RestoreFromSnapshot.html

http://docs.aws.amazon.com/cli/latest/reference/rds/restore-db-instance-from-db-snapshot.html

Body:
Is there a way to automatically generate the database creation string for an empty database with settings from an existing database?

I created an AWS RDS postgresql database instance using the console in my browser.  I selected all kind of setting in my browser and launched the instance. Now I want to replicate this database (empty) with a command for programmatic use. I would like to delete the existing RDS instance so a raw command would be preferred (no reference to another RDS) but something like:

aws create-db-instance --db-name database02 --allocated-storage 200 --engine postgres etc.

Body:
You'll need to create a snapshot of the source Database, instance or cluster and then create a new database based on that snapshot. You can delete the source database after the snapshot is complete.

aws rds create-db-snapshot
    --db-snapshot-identifier mydbsnapshot
    --db-instance-identifier mydb

aws rds restore-db-instance-from-db-snapshot
    --db-instance-identifier mynewdbinstance
    --db-snapshot-identifier mydbsnapshot

http://docs.aws.amazon.com/cli/latest/reference/rds/create-db-snapshot.html

http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_RestoreFromSnapshot.html

http://docs.aws.amazon.com/cli/latest/reference/rds/restore-db-instance-from-db-snapshot.html


问:
xslt moving up child attribute to parent and remove first linie.
Input:

```<code><Conductor Tag="A111K" Type="Normal" Length="7481" Length_Status="Real" Gauge="0.5" Wire_Type="08NtyH" Class="" Segregation="2A" TemperatureZone="20" Net="163K" Description="" Material="Undefined" MaterialType="Copper" ExternalDiameter="8.8" ProvidedWithEquipment="No" Color="BU" TagType="Standard" WireOrder="0" SourceType="Automatic" ManualAssignation="No" Resistivity="0" XDirectionLength="5497">
                        <UserAttribute AttributeName="NeoNetTAG" AttributeValue="blabla_018" />
                        <UserAttribute AttributeName="NeoWireTAG" AttributeValue="xxxxxxx_02" />
                        <MFConductorExtremityFrom/>
    </Conductor>
</code>```

output

```<code><Conductor AttributeValue="xxxxxxx_02" Tag="A111K" Type="Normal" Length="7481" Length_Status="Real" Gauge="0.5" Wire_Type="08NtyH" Class="" Segregation="2A" TemperatureZone="20" Net="163K" Description="" Material="Undefined" MaterialType="Copper" ExternalDiameter="8.8" ProvidedWithEquipment="No" Color="BU" TagType="Standard" WireOrder="0" SourceType="Automatic" ManualAssignation="No" Resistivity="0" XDirectionLength="5497">
                    <MFConductorExtremityFrom/>
</Conductor>
</code>```

I try: XSLT but only remove both:(

```<code><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:output method="xml" version="1.0" encoding="utf-8" indent="yes"/>

  <xsl:strip-space elements="*"/>

  <xsl:template match="Conductor">
    <xsl:copy>
      <!--
      Apply the attributes of the current node and the attributes of all
      following siblings (in this case, <address> and <phone>)
      -->
      <xsl:apply-templates select="@* | following-sibling::*/@*"/>
    </xsl:copy>
  </xsl:template>

  <!-- Drop the <address> and <phone> elements -->
  <xsl:template match="AttributeValue"/>

  <!--
  Identity transform: copy attributes and elements from input document to output
  document as is
  -->
  <xsl:template match="@* | node()">
    <xsl:copy>
      <xsl:apply-templates select="@* | node()"/>
    </xsl:copy>
  </xsl:template>
</xsl:stylesheet>
</code>```

I've been at this a while now - have got the XSLT working mostly, removed unwanted nodes and attributes, but there's one part of it that is throwing me.
Help me:(

答:
I think the expression you want is this...

```<code><xsl:apply-templates
     select="@*|UserAttribute[@AttributeName='NeoWireTAG']/@AttributeValue"/>
</code>```

Or maybe this, as I am not sure of your exact logic....

```<code><xsl:apply-templates select="@*|UserAttribute[last()]/@AttributeValue"/>
</code>```

You also need a template to then remove the UserAttribute nodes.

```<code><xsl:template match="UserAttribute"/>
</code>```

Try this XSLT

```<code><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:output method="xml" version="1.0" encoding="utf-8" indent="yes"/>

  <xsl:strip-space elements="*"/>

  <xsl:template match="Conductor">
    <xsl:copy>
      <xsl:apply-templates select="@*|UserAttribute[last()]/@AttributeValue"/>
      <xsl:apply-templates />
    </xsl:copy>
  </xsl:template>

  <xsl:template match="UserAttribute"/>

  <xsl:template match="@* | node()">
    <xsl:copy>
      <xsl:apply-templates select="@* | node()"/>
    </xsl:copy>
  </xsl:template>
</xsl:stylesheet>
</code>```

Body:
Input:

<Conductor Tag="A111K" Type="Normal" Length="7481" Length_Status="Real" Gauge="0.5" Wire_Type="08NtyH" Class="" Segregation="2A" TemperatureZone="20" Net="163K" Description="" Material="Undefined" MaterialType="Copper" ExternalDiameter="8.8" ProvidedWithEquipment="No" Color="BU" TagType="Standard" WireOrder="0" SourceType="Automatic" ManualAssignation="No" Resistivity="0" XDirectionLength="5497">
                        <UserAttribute AttributeName="NeoNetTAG" AttributeValue="blabla_018" />
                        <UserAttribute AttributeName="NeoWireTAG" AttributeValue="xxxxxxx_02" />
                        <MFConductorExtremityFrom/>
    </Conductor>

output

<Conductor AttributeValue="xxxxxxx_02" Tag="A111K" Type="Normal" Length="7481" Length_Status="Real" Gauge="0.5" Wire_Type="08NtyH" Class="" Segregation="2A" TemperatureZone="20" Net="163K" Description="" Material="Undefined" MaterialType="Copper" ExternalDiameter="8.8" ProvidedWithEquipment="No" Color="BU" TagType="Standard" WireOrder="0" SourceType="Automatic" ManualAssignation="No" Resistivity="0" XDirectionLength="5497">
                    <MFConductorExtremityFrom/>
</Conductor>

I try: XSLT but only remove both:(

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:output method="xml" version="1.0" encoding="utf-8" indent="yes"/>

  <xsl:strip-space elements="*"/>

  <xsl:template match="Conductor">
    <xsl:copy>

      <xsl:apply-templates select="@* | following-sibling::*/@*"/>
    </xsl:copy>
  </xsl:template>

  <xsl:template match="AttributeValue"/>

  <xsl:template match="@* | node()">
    <xsl:copy>
      <xsl:apply-templates select="@* | node()"/>
    </xsl:copy>
  </xsl:template>
</xsl:stylesheet>

I've been at this a while now - have got the XSLT working mostly, removed unwanted nodes and attributes, but there's one part of it that is throwing me.
Help me:(

Body:
I think the expression you want is this...

<xsl:apply-templates
     select="@*|UserAttribute[@AttributeName='NeoWireTAG']/@AttributeValue"/>

Or maybe this, as I am not sure of your exact logic....

<xsl:apply-templates select="@*|UserAttribute[last()]/@AttributeValue"/>

You also need a template to then remove the UserAttribute nodes.

<xsl:template match="UserAttribute"/>

Try this XSLT

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:output method="xml" version="1.0" encoding="utf-8" indent="yes"/>

  <xsl:strip-space elements="*"/>

  <xsl:template match="Conductor">
    <xsl:copy>
      <xsl:apply-templates select="@*|UserAttribute[last()]/@AttributeValue"/>
      <xsl:apply-templates />
    </xsl:copy>
  </xsl:template>

  <xsl:template match="UserAttribute"/>

  <xsl:template match="@* | node()">
    <xsl:copy>
      <xsl:apply-templates select="@* | node()"/>
    </xsl:copy>
  </xsl:template>
</xsl:stylesheet>


问:
For Loop NullPointerException with Apache POI
First of all, I apologize for my bad english, it's not my primary language.
I'm having a problem with my code when it's reading an excel file (xlsx). The first time I used my code it works perfectly, but now I can't use it.
The excel content is printed on the console, but next to it there is a NullPointerException that is caused by the for loop marked with the (-->>>).
If anyone can help me, I would be very thankful, this code has given me several headaches. </p>

```<code>package modleerjava;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;

public class leerExcel {
public void readExcel(String rutaFile,String nombreFile, String sheetName )
 throws IOException {
    File file = new File ("C:/Users/Pablo/Desktop/prueba.xlsx");
    FileInputStream inputStream = new FileInputStream(file);
    XSSFWorkbook excelWorkbook ;
    excelWorkbook = new XSSFWorkbook(inputStream);
    Sheet excelSheet = excelWorkbook.getSheet(sheetName);
    int filasCount = excelSheet.getLastRowNum()-excelSheet.getFirstRowNum();

    for (int i=0; i< filasCount+1 ; i++) {
        Row filas;
        filas = excelSheet.getRow(i);

 -->>>  for (int j=0 ; j < filas.getLastCellNum(); j++) {
            System.out.print(filas.getCell(j).getStringCellValue()+"|| ");
        }
        System.out.println();
    }

}

}
</code>```

答:
By seeing the code, I think that NullPointerException will occur if the first row in the excel sheet is blank. So, I have created an Iterator on rows.

Try the below code:

```<code>package modleerjava;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;

public class leerExcel {
public void readExcel(String rutaFile,String nombreFile, String sheetName )
 throws IOException {
    File file = new File ("C:/Users/Pablo/Desktop/prueba.xlsx");
    FileInputStream inputStream = new FileInputStream(file);
    XSSFWorkbook excelWorkbook ;
    excelWorkbook = new XSSFWorkbook(inputStream);
    inputStream.close();
    Sheet excelSheet = excelWorkbook.getSheet(sheetName);
    //int filasCount = excelSheet.getLastRowNum()-excelSheet.getFirstRowNum();
    Iterator<Row> row = excelSheet.rowIterator();
    while(row.hasNext()) {
        Row filas;
        filas = row.next();

        for (int j=0 ; j < filas.getLastCellNum(); j++) {
            System.out.print(filas.getCell(j).getStringCellValue()+"|| ");
        }
        System.out.println();
    }

}

 }
</code>```

Body:
First of all, I apologize for my bad english, it's not my primary language.
I'm having a problem with my code when it's reading an excel file (xlsx). The first time I used my code it works perfectly, but now I can't use it.
The excel content is printed on the console, but next to it there is a NullPointerException that is caused by the for loop marked with the (-->>>).
If anyone can help me, I would be very thankful, this code has given me several headaches.

package modleerjava;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;

public class leerExcel {
public void readExcel(String rutaFile,String nombreFile, String sheetName )
 throws IOException {
    File file = new File ("C:/Users/Pablo/Desktop/prueba.xlsx");
    FileInputStream inputStream = new FileInputStream(file);
    XSSFWorkbook excelWorkbook ;
    excelWorkbook = new XSSFWorkbook(inputStream);
    Sheet excelSheet = excelWorkbook.getSheet(sheetName);
    int filasCount = excelSheet.getLastRowNum()-excelSheet.getFirstRowNum();

    for (int i=0; i< filasCount+1 ; i++) {
        Row filas;
        filas = excelSheet.getRow(i);

 -->>>  for (int j=0 ; j < filas.getLastCellNum(); j++) {
            System.out.print(filas.getCell(j).getStringCellValue()+"|| ");
        }
        System.out.println();
    }

}

}

Body:
By seeing the code, I think that NullPointerException will occur if the first row in the excel sheet is blank. So, I have created an Iterator on rows.

Try the below code:

package modleerjava;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;

public class leerExcel {
public void readExcel(String rutaFile,String nombreFile, String sheetName )
 throws IOException {
    File file = new File ("C:/Users/Pablo/Desktop/prueba.xlsx");
    FileInputStream inputStream = new FileInputStream(file);
    XSSFWorkbook excelWorkbook ;
    excelWorkbook = new XSSFWorkbook(inputStream);
    inputStream.close();
    Sheet excelSheet = excelWorkbook.getSheet(sheetName);
    //int filasCount = excelSheet.getLastRowNum()-excelSheet.getFirstRowNum();
    Iterator<Row> row = excelSheet.rowIterator();
    while(row.hasNext()) {
        Row filas;
        filas = row.next();

        for (int j=0 ; j < filas.getLastCellNum(); j++) {
            System.out.print(filas.getCell(j).getStringCellValue()+"|| ");
        }
        System.out.println();
    }

}

 }


问:
NativeScript debug with WebStorm - breakpoints not being hit?
I'm using WebStorm 2017.2.5 + NativeScript  3.3.1. (package.json)

I've created a run/debug configuration :

And also set breakpoints in :

And now I hit :

The app is running  - And here is the output from console.

Question

WebStorm is not stopping in the breakpoints that I've attached. How can I fix that?

答:
Are you perhaps setting your breakpoints too early during code execution (entry file?) If that's the case, then you should place debugger statements at the key points where need to break, and initiate the debugging session with the --debug-brk flag, as explained in the following article: https://docs.nativescript.org/tooling/chrome-devtools#debugger

Why doesn't the debugger pause on entry files by default? The debug inspector works on the main thread, where most of your javascript, and the one that you'll be debugging, executes. The --debug-brk is necessary to instruct the runtime(platform) to not run any code before the debugger has attached, so as to not execute a script before having a chance to work with the debugger.

It is possible that the script is parsed and executed first, before notifications of 'preset' breakpoints are sent to the inspector, however debugger statements are part of your code execution, so if your inspector is connected, it will most certainly pause.


问:
Windows doesn't receive multicast IPv6 packets from all interfaces
I am trying to receive IPv6 multicast packets (sent to the ff02::1 address) on Windows using this python 2.7 code-

```<code>import socket
import win_inet_pton
import struct

socket.IPPROTO_IPV6=41  #because using python 2.7 on wondows

PORT = 1234
UDP_BROADCAST_IPv6 = "ff02::1"

sock = socket.socket(socket.AF_INET6, socket.SOCK_DGRAM, socket.IPPROTO_UDP)
sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)

sock.bind(("",PORT)) # not working with "::" either

# Join multicast group
addrinfo = socket.getaddrinfo(UDP_BROADCAST_IPv6, None)[0]
group = socket.inet_pton(addrinfo[0], addrinfo[4][0])
mreq = group + struct.pack('@I', 0)
sock.setsockopt(socket.IPPROTO_IPV6, socket.IPV6_JOIN_GROUP, mreq)

while True:
    msg=sock.recv(1024)
    print msg
</code>```

I send packets from another computer that is connected to my computer via Ethernet; in addition, my computer also has a WiFi interface. Although I'm able to see the relevant packets when sniffing the Ethernet connection with Wireshark, the packets are not received by this code.

However, when I disable the WiFi network card, the packets are received.
This makes me think that while the WiFi interface is enabled the code listens only to packets from that interface.

I read that binding to "" should enable receiving packets from all network interfaces, but for some reason it doesn't work for me.

Does anyone have any idea to something that I have forgotten to do? or a different way to solve this?

Thanks!

答:
Solved it :)

So apparently IPv6 doesn't listen to multicast from all interfaces. This syntax

```<code>mreq = group + struct.pack('@I', 0)
</code>```

was wrong. According to this, mreq is composed of the group id and the interface id, where 0 is the default interface (in my case- WiFi). In order to listen to multicast from other interfaces, the network interface index should be specified.

The network interface index is the number thet appears after the % in the ipv6 address when running ipconfig, and can also be found running "route print" in cmd.

I used this code to find it on python:

```<code>import netifaces as ni
import _winreg as wr # use "winreg" in python3

def get_ethernet_ipv6_ifindex():
    x=ni.interfaces()
    con_names=get_connection_name_from_guid(x)
    ethernet_index= con_names.index('Ethernet')

    addresses= ni.ifaddresses(x[ethernet_index])
    brod_addr=addresses[socket.AF_INET6][-1]["broadcast"]

    return int(brod_addr[brod_addr.find("%")+1:])

"""
Taken from the very helpful https://stackoverflow.com/questions/29913516/how-to-get-meaningful-network-interface-names-instead-of-guids-with-netifaces-un
"""
def get_connection_name_from_guid(iface_guids):
    iface_names = ['(unknown)' for i in range(len(iface_guids))]
    reg = wr.ConnectRegistry(None, wr.HKEY_LOCAL_MACHINE)
    reg_key = wr.OpenKey(reg, r'SYSTEM\CurrentControlSet\Control\Network\{4d36e972-e325-11ce-bfc1-08002be10318}')
    for i in range(len(iface_guids)):
        try:
            reg_subkey = wr.OpenKey(reg_key, iface_guids[i] + r'\Connection')
            iface_names[i] = wr.QueryValueEx(reg_subkey, 'Name')[0]
        except WindowsError:
            pass
    return iface_names
</code>```

And then-

```<code>mreq = group + struct.pack('@I', get_ethernet_ipv6_ifindex())
</code>```

Body:
I am trying to receive IPv6 multicast packets (sent to the ff02::1 address) on Windows using this python 2.7 code-

import socket
import win_inet_pton
import struct

socket.IPPROTO_IPV6=41  #because using python 2.7 on wondows

PORT = 1234
UDP_BROADCAST_IPv6 = "ff02::1"

sock = socket.socket(socket.AF_INET6, socket.SOCK_DGRAM, socket.IPPROTO_UDP)
sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)

sock.bind(("",PORT)) # not working with "::" either

# Join multicast group
addrinfo = socket.getaddrinfo(UDP_BROADCAST_IPv6, None)[0]
group = socket.inet_pton(addrinfo[0], addrinfo[4][0])
mreq = group + struct.pack('@I', 0)
sock.setsockopt(socket.IPPROTO_IPV6, socket.IPV6_JOIN_GROUP, mreq)

while True:
    msg=sock.recv(1024)
    print msg

I send packets from another computer that is connected to my computer via Ethernet; in addition, my computer also has a WiFi interface. Although I'm able to see the relevant packets when sniffing the Ethernet connection with Wireshark, the packets are not received by this code.

However, when I disable the WiFi network card, the packets are received.
This makes me think that while the WiFi interface is enabled the code listens only to packets from that interface.

I read that binding to "" should enable receiving packets from all network interfaces, but for some reason it doesn't work for me.

Does anyone have any idea to something that I have forgotten to do? or a different way to solve this?

Thanks!

Body:
Solved it :)

So apparently IPv6 doesn't listen to multicast from all interfaces. This syntax

mreq = group + struct.pack('@I', 0)

was wrong. According to this, mreq is composed of the group id and the interface id, where 0 is the default interface (in my case- WiFi). In order to listen to multicast from other interfaces, the network interface index should be specified.

The network interface index is the number thet appears after the % in the ipv6 address when running ipconfig, and can also be found running "route print" in cmd.

I used this code to find it on python:

import netifaces as ni
import _winreg as wr # use "winreg" in python3

def get_ethernet_ipv6_ifindex():
    x=ni.interfaces()
    con_names=get_connection_name_from_guid(x)
    ethernet_index= con_names.index('Ethernet')

    addresses= ni.ifaddresses(x[ethernet_index])
    brod_addr=addresses[socket.AF_INET6][-1]["broadcast"]

    return int(brod_addr[brod_addr.find("%")+1:])

"""
Taken from the very helpful https://stackoverflow.com/questions/29913516/how-to-get-meaningful-network-interface-names-instead-of-guids-with-netifaces-un
"""
def get_connection_name_from_guid(iface_guids):
    iface_names = ['(unknown)' for i in range(len(iface_guids))]
    reg = wr.ConnectRegistry(None, wr.HKEY_LOCAL_MACHINE)
    reg_key = wr.OpenKey(reg, r'SYSTEM\CurrentControlSet\Control\Network\{4d36e972-e325-11ce-bfc1-08002be10318}')
    for i in range(len(iface_guids)):
        try:
            reg_subkey = wr.OpenKey(reg_key, iface_guids[i] + r'\Connection')
            iface_names[i] = wr.QueryValueEx(reg_subkey, 'Name')[0]
        except WindowsError:
            pass
    return iface_names

And then-

mreq = group + struct.pack('@I', get_ethernet_ipv6_ifindex())


问:
Adding custom methods to standard ruby objects
How can I add custom methods to standard ruby objects, such as strings and integers?

I have seen this in, for example, rails, and the mojinizer library for ruby that can convert a romaji string into hiragana, as in

```<code>"tsukue".hiragana #=> "つくえ"
</code>```

答:
If you indeed feel a necessity to extend default behavior of classes you do not own (which is basically a very bad idea, one should use other ways to achieve this functionality,) you should not re-open classes, but Module#prepend a module with the requested functionality instead:

```<code>String.prepend(Module.new do
  def uppercase!
    self.replace upcase
  end
end)

str = "hello"
str.uppercase!
#⇒ "HELLO"
str
#⇒ "HELLO"
</code>```

If the method to be overwritten existed in the class, it might still be accessed with a call to super from inside the module method.

Body:
How can I add custom methods to standard ruby objects, such as strings and integers?

I have seen this in, for example, rails, and the mojinizer library for ruby that can convert a romaji string into hiragana, as in

"tsukue".hiragana #=> "つくえ"

Body:
If you indeed feel a necessity to extend default behavior of classes you do not own (which is basically a very bad idea, one should use other ways to achieve this functionality,) you should not re-open classes, but Module#prepend a module with the requested functionality instead:

String.prepend(Module.new do
  def uppercase!
    self.replace upcase
  end
end)

str = "hello"
str.uppercase!
#⇒ "HELLO"
str
#⇒ "HELLO"

If the method to be overwritten existed in the class, it might still be accessed with a call to super from inside the module method.


问:
CSS only - how to make buttons slide out and keep position until mouse leaves?
I want to use css only and make buttons slide to the right on mouse hover. I also want them to stay 'slided out' when I hover over the slided out buttons. I have looked at some posts and tried to do the same but my transition doesnt really work. Also, when I hover over buttons, buttons disappear. Thanks!!

I created a jsfiddle so you can see what I mean.

https://jsfiddle.net/codingcodingcoding/58406ahk/

.div{
      -webkit-transition: width 5s;
        transition: width 5s;
    }

    .hiddenButtons{
      display:none;
    }
    .div:hover + .hiddenButtons{
      display:inline-block;
    }
    .div:not(:hover) + .hiddenButtons{
      display:none;
    }```
<pre class="snippet-code-html lang-html prettyprint-override"><code>  <div class="div">
        SHOW
    </div>
    <div class="hiddenButtons">
        <div class="button1">
            <a>button1</a>
        </div>
        <div class="button2">
            <a>button2</a>
        </div>
    </div>

    </code>```

答:
The hidden buttons must be child elements of the SHOW button to stay visible during hover.

.div{
      -webkit-transition: width 5s;
        transition: width 5s;
    }

    .hiddenButtons{
      display:none;
    }
    .div:hover .hiddenButtons{
      display:inline-block;
    }```
<pre class="snippet-code-html lang-html prettyprint-override"><code>  <div class="div">
        SHOW

    <div class="hiddenButtons">
        <div class="button1">
            <a>button1</a>
        </div>
        <div class="button2">
            <a>button2</a>
        </div>
    </div>
    </div>

    </code>```

Body:
I want to use css only and make buttons slide to the right on mouse hover. I also want them to stay 'slided out' when I hover over the slided out buttons. I have looked at some posts and tried to do the same but my transition doesnt really work. Also, when I hover over buttons, buttons disappear. Thanks!!

I created a jsfiddle so you can see what I mean.

https://jsfiddle.net/codingcodingcoding/58406ahk/

.div{
      -webkit-transition: width 5s;
        transition: width 5s;
    }

    .hiddenButtons{
      display:none;
    }
    .div:hover + .hiddenButtons{
      display:inline-block;
    }
    .div:not(:hover) + .hiddenButtons{
      display:none;
    }

        SHOW

            button1

            button2

Body:
The hidden buttons must be child elements of the SHOW button to stay visible during hover.

.div{
      -webkit-transition: width 5s;
        transition: width 5s;
    }

    .hiddenButtons{
      display:none;
    }
    .div:hover .hiddenButtons{
      display:inline-block;
    }

  <div class="div">
        SHOW

    <div class="hiddenButtons">
        <div class="button1">
            <a>button1</a>
        </div>
        <div class="button2">
            <a>button2</a>
        </div>
    </div>
    </div>


问:
Web3 Call Back Issue for Function - Solidity
I am trying to connect a contract to my private RPC server. I would like to be able to update a counter parameter on my html page, which in turn references to my solidity contract file and updates on my browser. However, I keep running into the follow error for my html file below. index.html and contract.sol includes below too. TY!

index.html

```<code><!doctype html>
        <html>
<head>
    <title>myDapp</title>
    <script src="web3.js/dist/web3.min.js"></script>

    <script type="text/javascript">

        var contract_address = "0x68FDbd58D28BeD866E07906f6129bAC86161e243";
        var contract_abi = [ { "constant": true, "inputs": [], "name": "getCreator", "outputs": [ { "name": "", "type": "address", "value": "0xc0f0fb70a63e7b345932da8eb427463f586be95d" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [], "name": "kill", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "name": "myNewNumber", "type": "uint256" } ], "name": "setMyNumber", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [], "name": "getMyNumber", "outputs": [ { "name": "", "type": "uint256", "value": "3" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "inputs": [], "payable": false, "stateMutability": "nonpayable", "type": "constructor" } ];

        if (typeof web3 !== 'undefined') {
            web3 = new Web3(web3.currentProvider);
        } else {
            // set the provider you want from Web3.providers
            web3 = new Web3(new Web3.providers.HttpProvider("http://localhost:8545"));
        }

        var contract_instance = web3.eth.contract(contract_abi).at(contract_address);
        console.log(contract_instance);

        function getCounter() {
            document.getElementById("myCounter").innerText = contract_instance.getMyNumber().toNumber().call;

}

    </script>
</head>
<body>
<h1>Interact with a contract</h1>

<button onclick="getCounter()">Update Counter</button>
<button onclick="increaseCounter()">Increase Counter</button>

<span id="myCounter"></span> Counter

</body>
</html>
</code>```

contract.sol

```<code>pragma solidity ^0.4.15;
contract MyContract {
    address creator;
    uint256 myNumber;

    function MyContract() public {
        creator = msg.sender;
        myNumber = 3;
    }

    function getCreator() public constant returns(address) {
        return creator;
    }

    function getMyNumber() public constant returns(uint256) {
        return myNumber;
    }

    function setMyNumber(uint256 myNewNumber) public {
        myNumber = myNewNumber;
    }

    function kill() public {
        if(msg.sender == creator) {
            selfdestruct(creator);
        }
    }
}
</code>```

答:
The problem is your trying to connect Metamask directly with web3.js that is not how you should do it.
Metamask is based on provider Engine and provider eninge doesn't support synchronous functions or operations for example:

You can't do
web3.eth.accounts

but you can do web3.eth.getAcounts().

In order to work best its best to use provider engine to inject your web3 and take it from there, you will notice how in order to make things run you will switch everything to an async format.

but in all cases use web3.js asynchronous functions and you will get what you want.

Body:
I am trying to connect a contract to my private RPC server. I would like to be able to update a counter parameter on my html page, which in turn references to my solidity contract file and updates on my browser. However, I keep running into the follow error for my html file below. index.html and contract.sol includes below too. TY!

index.html

<!doctype html>

    <title>myDapp</title>

Interact with a contract

<button onclick="getCounter()">Update Counter</button>
<button onclick="increaseCounter()">Increase Counter</button>

 Counter

contract.sol

pragma solidity ^0.4.15;
contract MyContract {
    address creator;
    uint256 myNumber;

    function MyContract() public {
        creator = msg.sender;
        myNumber = 3;
    }

    function getCreator() public constant returns(address) {
        return creator;
    }

    function getMyNumber() public constant returns(uint256) {
        return myNumber;
    }

    function setMyNumber(uint256 myNewNumber) public {
        myNumber = myNewNumber;
    }

    function kill() public {
        if(msg.sender == creator) {
            selfdestruct(creator);
        }
    }
}