Modify

Opened 8 years ago

Closed 7 years ago

#314 closed defect (fixed)

Import error when email2trac is run

Reported by: anonymous Owned by: bas
Priority: major Milestone:
Component: email2trac Version: 2.6.2
Keywords: Cc:

Description (last modified by bas)

I have following error when email2trac is run on test email msg.txt:

/usr/share/python2.6/site-packages/trac/__init__.py:17: UserWarning: Module trac was already imported from /usr/share/python2.6/site-packages/trac/__init__.pyc, but /usr/share/python2.6/site-packages/Trac-1.0.1-py2.6.egg is being added to sys.path
  __version__ = get_distribution('Trac').version
2013-02-13 16:31:55,337 email2trac maintenance: Found trac version: 1.0
2013-02-13 16:31:55,481 email2trac maintenance: Traceback (most recent call last):

2013-02-13 16:31:55,481 email2trac maintenance:   File "/usr/local/bin/email2trac", line 2671, in <module>
    from trac.test import Mock, MockPerm

2013-02-13 16:31:55,481 email2trac maintenance:   File "/usr/share/python2.6/site-packages/trac/test.py", line 22, in <module>
    import doctest

2013-02-13 16:31:55,482 email2trac maintenance:   File "/usr/share/python2.6/doctest.py", line 99, in <module>

2013-02-13 16:31:55,482 email2trac maintenance: ImportError: No module named pdb

Attachments (0)

Change History (9)

comment:1 Changed 8 years ago by bas

  • Description modified (diff)

comment:2 Changed 8 years ago by bas

  • Status changed from new to assigned

Is seems that you have installed multiple trac instances? Is this correct? If you execute this on your command line:

python
from trac import __version__ as trac_version
print trac_version

or

python
import pdb

comment:3 follow-up: Changed 8 years ago by anonymous

I corrected the problem with two instances but the problem still persists: 2013-02-14 11:38:09,656 email2trac maintenance: Found trac version: 1.0 2013-02-14 11:38:09,811 email2trac maintenance: Traceback (most recent call last): 2013-02-14 11:38:09,811 email2trac maintenance: File "/usr/local/bin/email2trac", line 2671, in <module> from trac.test import Mock, MockPerm? 2013-02-14 11:38:09,812 email2trac maintenance: File "build/bdist.linux-i686/egg/trac/test.py", line 22, in <module> 2013-02-14 11:38:09,812 email2trac maintenance: File "/usr/share/python2.6/doctest.py", line 99, in <module> 2013-02-14 11:38:09,812 email2trac maintenance: ImportError?: No module named pdb

runing python import pdb gives error: Traceback (most recent call last):

File "<stdin>", line 1, in <module>

ImportError?: No module named pdb

comment:4 in reply to: ↑ 3 Changed 8 years ago by bas

runing python import pdb gives error: Traceback (most recent call last):

File "<stdin>", line 1, in <module>

ImportError?: No module named pdb

This is the problem. The python module pdb.py is not installed. Or due use virtualenv and installed python/trac in it?

comment:5 Changed 8 years ago by anonymous

Pehaps a stupid question - but how to install pdb - I cound not find an rpm with my package manager nor with easy_install?

comment:6 Changed 8 years ago by bas

Not at all. For my debian installation it is in the core python installation:

python2.6: /usr/lib/python2.6/pdb.py

It is the python debugger. Maybe it is a separate package for RPM distro's

comment:7 Changed 8 years ago by anonymous

Finally I have found it - on my distribution (PLD) it is in python-devel-tools. emailt2trac now works without errors.

comment:8 Changed 8 years ago by bas

thanks for reporting.

comment:9 Changed 7 years ago by bas

  • Description modified (diff)
  • Resolution set to fixed
  • Status changed from assigned to closed

documented in faq

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.