#3306 closed defect (fixed)
Error initializing enviroment on Windows
| Reported by: | 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 , 19 years ago
| Milestone: | 0.10 |
|---|
comment:2 by , 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 , 19 years ago
| Cc: | added |
|---|
comment:4 by , 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.
follow-up: 6 comment:5 by , 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.
comment:6 by , 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 , 19 years ago
| Milestone: | → 0.10 |
|---|
comment:8 by , 19 years ago
| Milestone: | 0.10 |
|---|---|
| Resolution: | → invalid |
| Status: | new → closed |
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 , 19 years ago
| Resolution: | invalid |
|---|---|
| Status: | closed → reopened |
comment:10 by , 19 years ago
| Resolution: | → invalid |
|---|---|
| Status: | reopened → closed |
Do not change the status of a ticket without providing some details about the reason for this change.
comment:11 by , 19 years ago
| Milestone: | → 0.10 |
|---|---|
| Resolution: | invalid |
| Status: | closed → reopened |
Encountered the very same problem, but when using the win32 installer.
- Did a trunk checkout, then generated the installer.
- Deleted previous site-packages/trac and share/trac files
- Kicked the installer which went fine.
- 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.



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.