Edgewall Software
Modify

Opened 19 years ago

Closed 18 years ago

Last modified 18 years ago

#3306 closed defect (fixed)

Error initializing enviroment on Windows

Reported by: mou@… Owned by: Jonas Borgström
Priority: high Milestone: 0.10
Component: general Version: devel
Severity: major Keywords:
Cc: mou@… Branch:
Release Notes:
API Changes:
Internal Changes:

Description

After install if i try to run Trac or initialize enviroment i get error

Failed to create environment. 'module' object has no attribute '__default_plugin
s_dir__'
Traceback (most recent call last):
  File "C:\Python23\Lib\site-packages\trac\scripts\admin.py", line 613, in do_in
itenv
    options=options)
  File "C:\Python23\Lib\site-packages\trac\env.py", line 121, in __init__
    load_components(self)
  File "C:\Python23\Lib\site-packages\trac\loader.py", line 37, in load_componen
ts
    'plugins'))),
  File "C:\Python23\Lib\site-packages\trac\config.py", line 399, in default_dir
    return getattr(siteconfig, '__default_%s_dir__' % name)
AttributeError: 'module' object has no attribute '__default_plugins_dir__'
Failed to initialize environment. 1
Traceback (most recent call last):
  File "C:\Python23\Lib\site-packages\trac\scripts\admin.py", line 617, in do_in
itenv
    sys.exit(1)
SystemExit: 1

Attachments (0)

Change History (12)

comment:1 by Christian Boos, 19 years ago

Milestone: 0.10

Did you forget to install?

You probably have a mixed setup, the C:\Python23\Lib\site-packages\trac correspond to some older trunk. You're probably running the script from the working directory you've just updated.

comment:2 by mou@…, 19 years ago

After adding in siteconfig.py

__default_plugins_dir__ = 'plugins'

all works but this is not correct. I don't know Trac architecture to understand bug and fix.

comment:3 by anonymous, 19 years ago

Cc: mou@… added

comment:4 by Christian Boos, 19 years ago

Your supposed to do a python setup.py install after an svn update or checkout. By doing that, the trac/siteconfig.py file will be generated automatically.

comment:5 by mou@…, 19 years ago

Yes i do python setup.py install after an svn update or checkout. But after it siteconfig.py does'nt contain default_plugins_dir definitions. Why this variable is present. I think that plugins dir is individual for each project. And there no need to define global path to plugins like to master Trac templates.

in reply to:  5 comment:6 by Matthew Good, 19 years ago

Replying to mou@msx.ru:

Yes i do python setup.py install after an svn update or checkout. But after it siteconfig.py does'nt contain __default_plugins_dir__ definitions.

From your checkout path look in "build/lib/trac.siteconfig.py" for the definition of the plugins dir. Also check your "setup.py" file for the presence of __default_plugins_dir__ in the content it writes to siteconfig.py.

Why this variable is present. I think that plugins dir is individual for each project. And there no need to define global path to plugins like to master Trac templates.

Yes, plugins can be installed for a single project, but we also added a global plugins directory to make it easier to install plugins that you intend to use in multiple projects.

comment:7 by anonymous, 19 years ago

Milestone: 0.10

comment:8 by Christian Boos, 19 years ago

Milestone: 0.10
Resolution: invalid
Status: newclosed

This ticket was about an user installation issue, not a problem with Trac. As the New Ticket warning says, installation issues should rather be headed to the MailingList first.

comment:9 by anonymous, 18 years ago

Resolution: invalid
Status: closedreopened

comment:10 by Emmanuel Blot, 18 years ago

Resolution: invalid
Status: reopenedclosed

Do not change the status of a ticket without providing some details about the reason for this change.

comment:11 by anonymous, 18 years ago

Milestone: 0.10
Resolution: invalid
Status: closedreopened

Encountered the very same problem, but when using the win32 installer.

  1. Did a trunk checkout, then generated the installer.
  2. Deleted previous site-packages/trac and share/trac files
  3. Kicked the installer which went fine.
  4. Then, when trying to trac-admin upgrade, encountered the trace mentionned in this ticket.

I guess the problem lies in trunk/scripts/trac-postinstall.py which does NOT contain the 'plugins' stuff.

Reopening and setting to 0.10, sorry for the noise if I'm wrong.

comment:12 by Christopher Lenz, 18 years ago

Resolution: fixed
Status: reopenedclosed

Fixed in [3675].

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jonas Borgström.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Jonas Borgström to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.