Modify

Opened 13 years ago

Closed 13 years ago

#85 closed defect (fixed)

ImportError: No module named genshi

Reported by: didley@… Owned by: bas
Priority: major Milestone:
Component: email2trac Version: 0.3
Keywords: Cc:

Description

I got this error when I start python email2trac.py.

Traceback (most recent call last):
  File "email2trac.py", line 104, in <module>
    from trac import config as trac_config
  File "d:\programme\python25\lib\site-packages\Trac-0.11stable-py2.5.egg\trac\config.py", line 19,
in <module>
    from trac.util.compat import set, sorted
  File "d:\programme\python25\lib\site-packages\Trac-0.11stable-py2.5.egg\trac\util\__init__.py", li
ne 32, in <module>
    from trac.util.html import escape, unescape, Markup, Deuglifier
  File "d:\programme\python25\lib\site-packages\Trac-0.11stable-py2.5.egg\trac\util\html.py", line 1
6, in <module>
    from genshi import Markup, escape, unescape
ImportError: No module named genshi

I'm using

Trac: 0.11stable
Python: 2.5 (r25:51908, Sep 19 2006, 09:52:17) [MSC v.1310 32 bit (Intel)]
setuptools: 0.6c6
SQLite: 3.3.4
pysqlite: 2.3.2
Genshi: 0.5.1dev
Subversion: 1.4.3 (r23084)
jQuery: 1.2.6

on Microsoft Windows 2000 SP5

Attachments (0)

Change History (10)

comment:1 Changed 13 years ago by bas

  • Status changed from new to assigned

It seems that you installed all necessary parts. What trac version did you specify in email2trac.conf?

comment:2 Changed 13 years ago by didley@…

These are my conf settings:

[DEFAULT]
project: D:\Project\test_migration_NAV_DE260_DE401
tmpdir: C:\tmp
ticket_update: 1
python_egg_cache: D:\Programme\Python25\Scripts
trac_version: 0.11
debug: 0
umask: 022
spam_level: 5
reply_all : 0
mailto_link: 0
umask: 022
email_header: 0
enable_syslog : 1
alternate_notify_template :
drop_spam : 0
verbatim_format: 1
strip_signature: 0
email_quote: >
strip_quotes: 0
ignore_trac_user_settings: 0

Another thing is pity. Normaly I got an email when tickets are changed. From your comment I didn't receive an email. Now I know I have to look into your your ticket list for comments.

didley

comment:3 Changed 13 years ago by anonymous

Due to SPAM i reset a setting in trac.ini. Have now re-enabled it, Thanks for reporting.

Another question is if you manually start python you can load the offending module:

from trac import config as trac_config

comment:4 Changed 13 years ago by didley@…

I think you mean that I should try to start from Python Shell. I did it and it looks like the same error.

IDLE 1.2      
>>> from trac import config as trac_config

Traceback (most recent call last):
  File "<pyshell#0>", line 1, in <module>
    from trac import config as trac_config
  File "d:\programme\python25\lib\site-packages\Trac-0.12dev-py2.5.egg\trac\config.py", line 19, in <module>
    from trac.util.compat import set, sorted
  File "d:\programme\python25\lib\site-packages\Trac-0.12dev-py2.5.egg\trac\util\__init__.py", line 33, in <module>
    from trac.util.html import escape, unescape, Markup, Deuglifier
  File "d:\programme\python25\lib\site-packages\Trac-0.12dev-py2.5.egg\trac\util\html.py", line 16, in <module>
    from genshi import Markup, escape, unescape
ImportError: No module named genshi

comment:5 Changed 13 years ago by bas

Yes that is what i meant. Did you install more then one python version? Maybe TRAC is using python2.4 or another version

comment:6 Changed 13 years ago by didley@…

No I installed just one python2.5

comment:7 Changed 13 years ago by anonymous

Is is still strange put your python search path for modules is wrong:

python
import sys
print sys.path

This prints your directories where python will look for modules. It can find trac. But not Genshi is not in your search path. In my site-packages directory i have an easy-install.pth where i can see which modules are installed:

import sys; sys.__plen = len(sys.path)
./Genshi-0.5-py2.5-linux-x86_64.egg
./TracUnixGroups-0.3_r1-py2.5.egg
./IniAdmin-0.2-py2.5.egg
./TracXMLRPC-1.0.0-py2.5.egg
./tracsearchall-0.1-py2.5.egg
./TracTicketDelete-2.0-py2.5.egg
./TracWikiRename-2.1.1-py2.5.egg
./TracMediaWikiMacro-1.0-py2.5.egg
./TracTags-0.6-py2.5.egg
./TracNewsFlash-0.1-py2.5.egg
./BatchModify-0.2.1-py2.5.egg
./Trac-0.11-py2.5.egg
import sys; new=sys.path[sys.__plen:]; del sys.path[sys.__plen:]; p=getattr(sys,'__egginsert',0); sys.path[p:p]=new; sys.__egginsert = p+len(new)

I am not a windows expert. So i do not know where everything is installed

comment:8 Changed 13 years ago by anonymous

I see.

I printed my sys.path and I got

['', 'D:\\Programme\\Python25\\lib\\site-packages\\bitten-0.6dev-py2.5.egg',
'D:\\Programme\\Python25\\lib\\site-packages\\tracwysiwyg-0.2-py2.5.egg',
'D:\\Programme\\Python25\\lib\\site-packages\\tracctxtnavadd-1.1_r1-py2.5.egg',
'D:\\Programme\\Python25\\lib\\site-packages\\testmanagementplugin-0.11.1-py2.5.egg',
'D:\\Programme\\Python25\\lib\\site-packages\\tracaccountmanager-0.2.1dev_r3832-py2.5.egg',
'D:\\Programme\\Python25\\lib\\site-packages\\timingandestimationplugin-0.6.6-py2.5.egg', '
D:\\Programme\\Python25\\lib\\site-packages\\tracforms-0.2-py2.5.egg',
'D:\\Programme\\Python25\\lib\\site-packages\\blackmagictickettweaks-0.1-py2.5.egg',
'D:\\Programme\\Python25\\lib\\site-packages\\tracusermanagerplugin-0.3-py2.5.egg',
'D:\\Programme\\Python25\\lib\\site-packages\\tracmastertickets-2.1.3-py2.5.egg',
'D:\\Programme\\Python25\\lib\\site-packages\\advancedticketworkflowplugin-0.10dev-py2.5.egg',
'D:\\Programme\\Python25\\lib\\site-packages\\trac-0.12dev-py2.5.egg',
'D:\\Programme\\Python25\\python25.zip',
'D:\\Programme\\Python25\\DLLs',
'D:\\Programme\\Python25\\lib',
'D:\\Programme\\Python25\\lib\\plat-win',
'D:\\Programme\\Python25\\lib\\lib-tk',
'D:\\Programme\\Python25',
'D:\\Programme\\Python25\\lib\\site-packages',
'D:\\Programme\\Python25\\lib\\site-packages\\PIL',
'D:\\Programme\\Python25\\lib\\site-packages\\gtk-2.0']

When I open the easy-install.pth then I got

import sys; sys.__plen = len(sys.path)
./bitten-0.6dev-py2.5.egg
./tracwysiwyg-0.2-py2.5.egg
./tracctxtnavadd-1.1_r1-py2.5.egg
./testmanagementplugin-0.11.1-py2.5.egg
./tracaccountmanager-0.2.1dev_r3832-py2.5.egg
./timingandestimationplugin-0.6.6-py2.5.egg
./tracforms-0.2-py2.5.egg
./blackmagictickettweaks-0.1-py2.5.egg
./tracusermanagerplugin-0.3-py2.5.egg
./tracmastertickets-2.1.3-py2.5.egg
./advancedticketworkflowplugin-0.10dev-py2.5.egg
./trac-0.12dev-py2.5.egg
./genshi-0.6dev-py2.5-win32.egg
import sys; new=sys.path[sys.__plen:]; del sys.path[sys.__plen:]; p=getattr(sys,'__egginsert',0); sys.path[p:p]=new; sys.__egginsert = p+len(new)

In my sys.path is no genshi but it is in my easy-install.pth. So I dont know what I can do but I'm will looking for a discusson forum of python how I can insert genshi in the sys.path.

After this I will try again to start email2trac. I will let you know what is the conclusion.

didley

comment:9 Changed 13 years ago by didley@…

I did install genshi again and after this it works. Now I got another error obout SMTP instance. That will be maybe a new ticket.

Thanx bas it was a great help

comment:10 Changed 13 years ago by bas

  • Resolution set to fixed
  • Status changed from assigned to closed

Add Comment

Modify Ticket

Change Properties
Action
as closed The owner will remain bas.
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.