Modify

Opened 6 months ago

Closed 6 months ago

Last modified 6 months ago

#14251 closed defect (duplicate)

Trac 1.6 support

Reported by: roger.oberholtzer@… Owned by: Cinc-th
Priority: normal Component: TracWikiPrintPlugin
Severity: normal Keywords:
Cc: Trac Release:

Description

I have installed the plugin on Trac 1.6. It is enabled (and apache restarted). But it does not do anything. I see the following in the Trac log:

2023-10-31 09:35:18,667 Trac[main] ERROR: [10.2.10.41] Internal Server Error: <RequestWithSession "GET '/chrome/wikiautocomplete/js/wikiautocomplete.js'">, referrer 'http://10.2.10.40/systems/timeline'
Traceback (most recent call last): 
  File "/usr/lib/python3.11/site-packages/Trac-1.5.4.dev0-py3.11.egg/trac/web/main.py", line 610, in dispatch_request 
    dispatcher.dispatch(req)
  File "/usr/lib/python3.11/site-packages/Trac-1.5.4.dev0-py3.11.egg/trac/web/main.py", line 302, in dispatch
    raise e
  File "/usr/lib/python3.11/site-packages/Trac-1.5.4.dev0-py3.11.egg/trac/web/main.py", line 248, in dispatch
    resp = chosen_handler.process_request(req)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/Trac-1.5.4.dev0-py3.11.egg/trac/web/chrome.py", line 718, in process_request
    in provider.get_htdocs_dirs() or []
       ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/TracWikiPrint-4.0.0.dev0-py3.11.egg/tracpdf/admin.py", line 153, in get_htdocs_dirs
    return [('wikiprint', resource_filename(__name__, 'htdocs'))]
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/pkg_resources/__init__.py", line 1213, in resource_filename
    return get_provider(package_or_requirement).get_resource_filename(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/pkg_resources/__init__.py", line 1855, in get_resource_filename
    return self._extract_resource(manager, zip_path)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/pkg_resources/__init__.py", line 1874, in _extract_resource
    timestamp, size = self._get_date_and_size(self.zipinfo[zip_path])
                                              ~~~~~~~~~~~~^^^^^^^^^^

I don't know if that's directly related. But as the enabled plugin does nothing, and this is in the Trac log, I thought it might be related.

Attachments (0)

Change History (5)

comment:1 Changed 6 months ago by Jun Omae

Please post entire of the stacktrace. Your posted log is cut off in the middle. Also, it is unable to determine whether it is caused by this plugin and/or TracWikiPrintPlugin. Retry after uninstalling TracWikiPrintPlugin.

comment:2 in reply to:  1 Changed 6 months ago by roger.oberholtzer@…

Replying to Jun Omae:

Please post entire of the stacktrace. Your posted log is cut off in the middle. Also, it is unable to determine whether it is caused by this plugin and/or TracWikiPrintPlugin. Retry after uninstalling TracWikiPrintPlugin.

I see that with TrackWikiPrint enabled, TracAutocomplete stops functioning. So there is some mysterious interaction going on.

I thought I had the whole trace. The message is repeated for two files:

2023-10-31 10:51:11,198 Trac[main] ERROR: [10.2.10.41] Internal Server Error: <RequestWithSession "GET '/chrome/wikiautocomplete/js/jquery.textcomplete.min.js'">, referrer 'http://10.2.10.40/systems/admin/general/plugin'

and

2023-10-31 10:51:11,198 Trac[main] ERROR: [10.2.10.41] Internal Server Error: <RequestWithSession "GET '/chrome/wikiautocomplete/js/wikiautocomplete.js'">, referrer 'http://10.2.10.40/systems/admin/general/plugin'

The Traceback following the name of the file causing the error is otherwise identical. There was a final line (seen below) that I did not think was related to this error. Maybe it is.

Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/Trac-1.5.4.dev0-py3.11.egg/trac/web/main.py", line 610, in dispatch_request
    dispatcher.dispatch(req)
  File "/usr/lib/python3.11/site-packages/Trac-1.5.4.dev0-py3.11.egg/trac/web/main.py", line 302, in dispatch
    raise e
  File "/usr/lib/python3.11/site-packages/Trac-1.5.4.dev0-py3.11.egg/trac/web/main.py", line 248, in dispatch
    resp = chosen_handler.process_request(req)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/Trac-1.5.4.dev0-py3.11.egg/trac/web/chrome.py", line 718, in process_request
    in provider.get_htdocs_dirs() or []
       ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/TracWikiPrint-4.0.0.dev0-py3.11.egg/tracpdf/admin.py", line 153, in get_htdocs_dirs
    return [('wikiprint', resource_filename(__name__, 'htdocs'))]
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/pkg_resources/__init__.py", line 1213, in resource_filename
    return get_provider(package_or_requirement).get_resource_filename(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/pkg_resources/__init__.py", line 1855, in get_resource_filename
    return self._extract_resource(manager, zip_path)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/pkg_resources/__init__.py", line 1874, in _extract_resource
    timestamp, size = self._get_date_and_size(self.zipinfo[zip_path])
                                              ~~~~~~~~~~~~^^^^^^^^^^
KeyError: 'tracpdf/htdocs'

comment:3 Changed 6 months ago by Jun Omae

Component: TracAutoCompletePluginTracWikiPrintPlugin
Owner: set to Cinc-th
Resolution: duplicate
Status: newclosed

Thanks. That is a duplicated TracWikiPrintPlugin's issue (#14163).

comment:4 Changed 6 months ago by Jun Omae

TracAutoCompletePlugin already supports Trac 1.6 and Python 3 (#13738 [17668]).

comment:5 Changed 6 months ago by roger.oberholtzer@…

I have added the change in #14163 and the error goes away. Now both plugins can coexist. I have passed this on to the wikiprint folk so they can decide what to do about that issue.

Modify Ticket

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

Add Comment


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

 
Note: See TracTickets for help on using tickets.