Hello,
I get the following with TurboGears-1.0.3.2 and
ToscaWidgets-0.1a2dev_3417.
Traceback (most recent call last):
File "./start-mytg.py", line 5, in ?
from turbogears import config, update_config, start_server
File "/usr/lib/python2.4/site-packages/TurboGears-1.0.3.2-py2.4.egg/
turbogears/__init__.py", line 21, in ?
ext = entrypoint.load()
File "/usr/lib/python2.4/site-packages/setuptools-0.6c6-py2.4.egg/
pkg_resources.py", line 1912, in load
entry = __import__(self.module_name, globals(),globals(),
['__name__'])
File "/usr/lib/python2.4/site-packages/ToscaWidgets-0.1a2dev_r3417-
py2.4.egg/toscawidgets/mods/tg.py", line 51, in ?
class Turbogears(HostFramework):
File "/usr/lib/python2.4/site-packages/ToscaWidgets-0.1a2dev_r3417-
py2.4.egg/toscawidgets/mods/tg.py", line 62, in Turbogears
engines.load_all(turbogears.config)
File "/usr/lib/python2.4/site-packages/ToscaWidgets-0.1a2dev_r3417-
py2.4.egg/toscawidgets/view.py", line 88, in load_all
self.load_engine(ep.name, engine_options, stdvars)
File "/usr/lib/python2.4/site-packages/ToscaWidgets-0.1a2dev_r3417-
py2.4.egg/toscawidgets/view.py", line 57, in load_engine
options = options.copy()
AttributeError: 'module' object has no attribute 'copy'
--
I investigated a little and found that "options" is turbogears.config,
which is not a dict object, as the exceptions says, but has some
functions which makes it resemble one (e.g. get, update). "copy" is,
as you can see, one of the functions it does _not_ have.
I think the following patch fixes it, but need someone more
knowledgeable to tell me.
--- view.py.orig 2007-09-07 12:45:34.000000000 -0700
+++ view.py 2007-09-07 12:21:30.000000000 -0700
@@ -54,11 +54,13 @@
raise EngineException("No plugin available for engine
'%s'" % name)
options = options or self.options or {}
+ tmp_options = {}
# emulate Kid and Genshi's dotted-path notation lookup
- options.setdefault('mako.directories', []).extend(sys.path)
+ tmp_options.setdefault('mako.directories',
[]).extend(sys.path)
# make sure mako produces utf-8 output so we can decode it
and use
# unicode internally
- options['mako.output_encoding'] = 'utf-8'
+ tmp_options['mako.output_encoding'] = 'utf-8'
+ options.update(tmp_options)
extra_vars_func = extra_vars_func or self.extra_vars_func
# Check for deprecated use.
Saludos,
--Renier
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears Trunk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/turbogears-trunk?hl=en
-~----------~----~----~----~------~----~------~--~---