Edgewall Software

Opened 18 years ago

Last modified 16 years ago

#2533 closed defect

"Failed to create environment. No module name log" error — at Version 4

Reported by: anaz Owned by: Jonas Borgström
Priority: normal Milestone:
Component: general Version: 0.9.3
Severity: normal Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description (last modified by Christian Boos)

Error when initialize project and enter the default template directory.

Creating and Initializing Project
'''Failed to create environment. No module named log'''
Traceback (most recent call last):
  File "C:\Python23\lib\site-packages\trac\scripts\admin.py", line 139, in env_c
reate
    self.__env = Environment(self.envname, create=True, db_str=db_str)
  File "C:\Python23\lib\site-packages\trac\env.py", line 83, in __init__
    self.setup_log()
  File "C:\Python23\lib\site-packages\trac\env.py", line 228, in setup_log
    from trac.log import logger_factory
'''ImportError: No module named log'''
'''Failed to initialize environment. 1'''
Traceback (most recent call last):
  File "C:\Python23\lib\site-packages\trac\scripts\admin.py", line 594, in do_in
itenv
    self.env_create(db_str)
  File "C:\Python23\lib\site-packages\trac\scripts\admin.py", line 144, in env_c
reate
    sys.exit(1)
SystemExit: 1

Change History (4)

comment:1 by anonymous, 18 years ago

Version: 0.9.20.8.4

comment:2 by Matthew Good, 18 years ago

Resolution: worksforme
Status: newclosed

Based on the filenames in the traceback you're certainly using code from Trac 0.9 or higher, not 0.8.4. My guess is that you just upgraded and left some of the old code behind which is causing problems. As suggested in the [wiki:TracUpgrade#UpdatetheTracCode upgrade documentation] you may want to delete the old Trac code and reinstall the new version.

comment:3 by chis.florinel@…, 18 years ago

Resolution: worksforme
Status: closedreopened

I'm getting the same error and I just installed for the first time on this machine trac: 0.9.3. Platform: windows

Creating and Initializing Project
Failed to create environment. No module named log
Traceback (most recent call last):
  File "C:\Python23\Lib\site-packages\trac\scripts\admin.py", line 139, in env_c
reate
    self.__env = Environment(self.envname, create=True, db_str=db_str)
  File "C:\Python23\Lib\site-packages\trac\env.py", line 83, in __init__
    self.setup_log()
  File "C:\Python23\Lib\site-packages\trac\env.py", line 228, in setup_log
    from trac.log import logger_factory
ImportError: No module named log
Failed to initialize environment. 1
Traceback (most recent call last):
  File "C:\Python23\Lib\site-packages\trac\scripts\admin.py", line 594, in do_in
itenv
    self.env_create(db_str)
  File "C:\Python23\Lib\site-packages\trac\scripts\admin.py", line 144, in env_c
reate
    sys.exit(1)
SystemExit: 1

comment:4 by Christian Boos, 18 years ago

Description: modified (diff)

Does the file "C:\Python23\Lib\site-packages\trac\log.py" exist?

Note: See TracTickets for help on using tickets.