TracWikiPrint - plugin install help

41 views
Skip to first unread message

Adam Terhune

unread,
Jun 1, 2021, 5:38:41 PM6/1/21
to Trac Users
I have an Trac Windows install that was created from the binamai Windows .exe installer. 

I'm having trouble installing the WikiPrint plug-in directly through the admin interface as an .egg.  Does anybody know, if this is not supported.

I'm not very familiar with the pip package installer.  Does this plug-in require pip?

RjOllos

unread,
Jun 1, 2021, 6:19:40 PM6/1/21
to Trac Users
On Tuesday, June 1, 2021 at 2:38:41 PM UTC-7 adam.t...@gmail.com wrote:
I have an Trac Windows install that was created from the binamai Windows .exe installer. 

I'm having trouble installing the WikiPrint plug-in directly through the admin interface as an .egg.  Does anybody know, if this is not supported.

It should work. Did you build the egg yourself?

To debug, you could check the logs:
 
I'm not very familiar with the pip package installer.  Does this plug-in require pip?

Plugins don't require pip, but it is a good way to get the latest version. 

Which Trac version and are you installing the latest TracWikiPrint?

Ryan
 

Adam Terhune

unread,
Jun 2, 2021, 11:10:24 AM6/2/21
to Trac Users
Trac version is 1.4.3

Indeed there is debug log info:
2021-06-02 09:57:46,907 Trac[web_ui] INFO: Installing plugin TracWikiPrint-4.0.0.dev0-py3.9.egg
2021-06-02 09:57:46,907 Trac[web_ui] INFO: Plugin TracWikiPrint-4.0.0.dev0-py3.9.egg installed to c:\trac\bitnami trac stack projects\wqm\plugins\TracWikiPrint-4.0.0.dev0-py3.9.egg

And I added this to the trac.ini in the components section:
[components]
wikiprint.*=enabled

However even after restarting there are no other errors or debug log entries like 'Loading plugin "trac.wikiprint" regarding this plugin


RjOllos

unread,
Jun 2, 2021, 1:16:49 PM6/2/21
to Trac Users
On Wednesday, June 2, 2021 at 8:10:24 AM UTC-7 adam.t...@gmail.com wrote:
Trac version is 1.4.3

Indeed there is debug log info:
2021-06-02 09:57:46,907 Trac[web_ui] INFO: Installing plugin TracWikiPrint-4.0.0.dev0-py3.9.egg
2021-06-02 09:57:46,907 Trac[web_ui] INFO: Plugin TracWikiPrint-4.0.0.dev0-py3.9.egg installed to c:\trac\bitnami trac stack projects\wqm\plugins\TracWikiPrint-4.0.0.dev0-py3.9.egg

And I added this to the trac.ini in the components section:
[components]
wikiprint.*=enabled

However even after restarting there are no other errors or debug log entries like 'Loading plugin "trac.wikiprint" regarding this plugin

Looks like the author changed the component names. Please try: 

[components]
tracpdf.*=enabled


Ryan

Adam Terhune

unread,
Jun 2, 2021, 5:12:13 PM6/2/21
to Trac Users
Ryan,

Thanks for your help.  Almost there.  I now have this in the log after rebuilding the .egg with the matching version of python on the server:

2021-06-02 14:55:03,007 Trac[loader] DEBUG: Skipping "TracWikiPrint 4.0.0.dev0": DistributionNotFound: The 'pdfkit' distribution was not found and is required by TracWikiPrint
2021-06-02 14:55:03,007 Trac[loader] DEBUG: Skipping "TracWikiPrint 3.0.1.dev0": DistributionNotFound: The 'xhtml2pdf' distribution was not found and is required by TracWikiPrint

However, I'm unsure where to install wkhtmltopdf.   https://trac-hacks.org/wiki/TracWikiPrintPlugin simply states:

Note: wkhtmltopdf must be in your path or more precisely in the path used by Trac.

What does this mean?  The path to the bitnami trac python folder?  The path to the trac project?  Or the full path to the project's plugin dir?

RjOllos

unread,
Jun 2, 2021, 5:15:38 PM6/2/21
to Trac Users
On Wednesday, June 2, 2021 at 2:12:13 PM UTC-7 adam.t...@gmail.com wrote:
Ryan,

Thanks for your help.  Almost there.  I now have this in the log after rebuilding the .egg with the matching version of python on the server:

2021-06-02 14:55:03,007 Trac[loader] DEBUG: Skipping "TracWikiPrint 4.0.0.dev0": DistributionNotFound: The 'pdfkit' distribution was not found and is required by TracWikiPrint
2021-06-02 14:55:03,007 Trac[loader] DEBUG: Skipping "TracWikiPrint 3.0.1.dev0": DistributionNotFound: The 'xhtml2pdf' distribution was not found and is required by TracWikiPrint

However, I'm unsure where to install wkhtmltopdf.   https://trac-hacks.org/wiki/TracWikiPrintPlugin simply states:

Note: wkhtmltopdf must be in your path or more precisely in the path used by Trac.

What does this mean?  The path to the bitnami trac python folder?  The path to the trac project?  Or the full path to the project's plugin dir?

The pdfkit package should be on the python path. It might work to build eggs and put them in the plugins folder. Or, just "pip install" the two packages. 

You'll want to delete the egg for TracWikiPrint 3.0.1.dev0 since you have TracWikiPrint 4.0.0.dev0 installed.

Adam Terhune

unread,
Jun 2, 2021, 5:49:59 PM6/2/21
to Trac Users
It''s woking! 

Installed .egg from here https://pypi.org/project/pdfkit/#files directly to plugins directly through the admin interface

Thanks again

-Adam 

Adam Terhune

unread,
Jun 14, 2021, 5:45:05 PM6/14/21
to Trac Users
I finally had a chance to re-visit this.  Although the PDF kit is installed.  I'm receiving this message when trying to download a PDF from Trac.  

Indeed I have copied the .exe to C:\Bitnami\trac-1.4.3-0\python\Lib\site-packages\wkhtmltopdfin\wkhtmltopdf.exe and restarted Trac apache services. 

Capture.PNG

Markus Rosjat

unread,
Jun 14, 2021, 5:48:11 PM6/14/21
to trac-...@googlegroups.com
We'll have you checked if the exe got the right permission for the trac process to execute it, like the error message suggest?

Cheers

Markus

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/d53e94be-fb8a-45a4-be8e-19743ebc0149n%40googlegroups.com.

Adam Terhune

unread,
Jun 14, 2021, 5:56:49 PM6/14/21
to Trac Users
Yes, Trac services are running as Local System.  He has full permission to the .exe.

Markus Rosjat

unread,
Jun 14, 2021, 6:11:23 PM6/14/21
to trac-...@googlegroups.com
Well I would still try to tinker with the permissions, especially on windows sometimes things are strange when it comes to permissions. 

I usually go the grant all permission route when something isn't working and tidy up if I get it to work with that approach

Cheers

Markus


Jun Omae

unread,
Jun 14, 2021, 11:06:29 PM6/14/21
to trac-...@googlegroups.com


On Tue, Jun 15, 2021 at 6:45 AM Adam Terhune <adam.t...@gmail.com> wrote:
I finally had a chance to re-visit this.  Although the PDF kit is installed.  I'm receiving this message when trying to download a PDF from Trac.  

Indeed I have copied the .exe to C:\Bitnami\trac-1.4.3-0\python\Lib\site-packages\wkhtmltopdfin\wkhtmltopdf.exe and restarted Trac apache services. 

Capture.PNG

I'm considering you've modified pdfkit source because "\t" in "C:\Bitnami\trac..." is shown as a TAB character in the image.
Try to correct or revert the changes of pdfkit if my guessing is right.
Reply all
Reply to author
Forward
0 new messages