Discussion:
[Zope3-Users] Need with bluebream tutorial
david ally
2010-10-25 15:57:05 UTC
Permalink
Hi Zopeist,

I was following the bluebream tutorial and could not start my server after
all the study; below is the error; This is the link to the tutorial I was
working on- http://bluebream.zope.org/doc/1.0/tutorial1.html

(zope_env)***@ubusvr101:~/ticketcollector$ ./bin/paster serve debug.ini
------
2010-10-25T16:43:47 WARNING root Developer mode is enabled: this is a
security risk and should NOT be enabled on production servers. Developer
mode can usually be turned off by setting the `devmode` option to `off` or
by removing it from the instance configuration file completely.
Traceback (most recent call last):
File "./bin/paster", line 117, in <module>
paste.script.command.run()
File
"/home/david/ticketcollector/eggs/PasteScript-1.7.3-py2.6.egg/paste/script/command.py",
line 84, in run
invoke(command, command_name, options, args[1:])
File
"/home/david/ticketcollector/eggs/PasteScript-1.7.3-py2.6.egg/paste/script/command.py",
line 123, in invoke
exit_code = runner.run(args)
File
"/home/david/ticketcollector/eggs/PasteScript-1.7.3-py2.6.egg/paste/script/command.py",
line 218, in run
result = self.command()
File
"/home/david/ticketcollector/eggs/PasteScript-1.7.3-py2.6.egg/paste/script/serve.py",
line 276, in command
relative_to=base, global_conf=vars)
File
"/home/david/ticketcollector/eggs/PasteScript-1.7.3-py2.6.egg/paste/script/serve.py",
line 313, in loadapp
**kw)
File
"/home/david/ticketcollector/eggs/PasteDeploy-1.3.3-py2.6.egg/paste/deploy/loadwsgi.py",
line 204, in loadapp
return loadobj(APP, uri, name=name, **kw)
File
"/home/david/ticketcollector/eggs/PasteDeploy-1.3.3-py2.6.egg/paste/deploy/loadwsgi.py",
line 225, in loadobj
return context.create()
File
"/home/david/ticketcollector/eggs/PasteDeploy-1.3.3-py2.6.egg/paste/deploy/loadwsgi.py",
line 625, in create
return self.object_type.invoke(self)
File
"/home/david/ticketcollector/eggs/PasteDeploy-1.3.3-py2.6.egg/paste/deploy/loadwsgi.py",
line 177, in invoke
next_app = context.next_context.create()
File
"/home/david/ticketcollector/eggs/PasteDeploy-1.3.3-py2.6.egg/paste/deploy/loadwsgi.py",
line 625, in create
return self.object_type.invoke(self)
File
"/home/david/ticketcollector/eggs/PasteDeploy-1.3.3-py2.6.egg/paste/deploy/loadwsgi.py",
line 188, in invoke
filtered = context.next_context.create()
File
"/home/david/ticketcollector/eggs/PasteDeploy-1.3.3-py2.6.egg/paste/deploy/loadwsgi.py",
line 625, in create
return self.object_type.invoke(self)
File
"/home/david/ticketcollector/eggs/PasteDeploy-1.3.3-py2.6.egg/paste/deploy/loadwsgi.py",
line 110, in invoke
return fix_call(context.object, context.global_conf,
**context.local_conf)
File
"/home/david/ticketcollector/eggs/PasteDeploy-1.3.3-py2.6.egg/paste/deploy/util/fixtypeerror.py",
line 57, in fix_call
val = callable(*args, **kw)
File "/home/david/ticketcollector/src/tc/main/startup.py", line 5, in
application_factory
return zope.app.wsgi.getWSGIApplication(zope_conf)
File
"/home/david/ticketcollector/eggs/zope.app.wsgi-3.9.2-py2.6.egg/zope/app/wsgi/__init__.py",
line 162, in getWSGIApplication
db = config(configfile, schemafile, features)
File
"/home/david/ticketcollector/eggs/zope.app.wsgi-3.9.2-py2.6.egg/zope/app/wsgi/__init__.py",
line 150, in config
appsetup.config(options.site_definition, features=features)
File
"/home/david/ticketcollector/eggs/zope.app.appsetup-3.14.0-py2.6.egg/zope/app/appsetup/appsetup.py",
line 111, in config
context = xmlconfig.file(file, context=context, execute=execute)
File
"/home/david/ticketcollector/eggs/zope.configuration-3.7.2-py2.6.egg/zope/configuration/xmlconfig.py",
line 651, in file
include(context, name, package)
File
"/home/david/ticketcollector/eggs/zope.configuration-3.7.2-py2.6.egg/zope/configuration/xmlconfig.py",
line 550, in include
processxmlfile(f, context)
File
"/home/david/ticketcollector/eggs/zope.configuration-3.7.2-py2.6.egg/zope/configuration/xmlconfig.py",
line 382, in processxmlfile
parser.parse(src)
File "/usr/lib/python2.6/xml/sax/expatreader.py", line 107, in parse
xmlreader.IncrementalParser.parse(self, source)
File "/usr/lib/python2.6/xml/sax/xmlreader.py", line 123, in parse
self.feed(buffer)
File "/usr/lib/python2.6/xml/sax/expatreader.py", line 207, in feed
self._parser.Parse(data, isFinal)
File "/usr/lib/python2.6/xml/sax/expatreader.py", line 349, in
end_element_ns
self._cont_handler.endElementNS(pair, None)
File
"/home/david/ticketcollector/eggs/zope.configuration-3.7.2-py2.6.egg/zope/configuration/xmlconfig.py",
line 361, in endElementNS
self.context.end()
File
"/home/david/ticketcollector/eggs/zope.configuration-3.7.2-py2.6.egg/zope/configuration/config.py",
line 538, in end
self.stack.pop().finish()
File
"/home/david/ticketcollector/eggs/zope.configuration-3.7.2-py2.6.egg/zope/configuration/config.py",
line 686, in finish
actions = self.handler(context, **args)
File
"/home/david/ticketcollector/eggs/zope.configuration-3.7.2-py2.6.egg/zope/configuration/xmlconfig.py",
line 550, in include
processxmlfile(f, context)
File
"/home/david/ticketcollector/eggs/zope.configuration-3.7.2-py2.6.egg/zope/configuration/xmlconfig.py",
line 382, in processxmlfile
parser.parse(src)
File "/usr/lib/python2.6/xml/sax/expatreader.py", line 107, in parse
xmlreader.IncrementalParser.parse(self, source)
File "/usr/lib/python2.6/xml/sax/xmlreader.py", line 123, in parse
self.feed(buffer)
File "/usr/lib/python2.6/xml/sax/expatreader.py", line 207, in feed
self._parser.Parse(data, isFinal)
File "/usr/lib/python2.6/xml/sax/expatreader.py", line 349, in
end_element_ns
self._cont_handler.endElementNS(pair, None)
File
"/home/david/ticketcollector/eggs/zope.configuration-3.7.2-py2.6.egg/zope/configuration/xmlconfig.py",
line 361, in endElementNS
self.context.end()
File
"/home/david/ticketcollector/eggs/zope.configuration-3.7.2-py2.6.egg/zope/configuration/config.py",
line 538, in end
self.stack.pop().finish()
File
"/home/david/ticketcollector/eggs/zope.configuration-3.7.2-py2.6.egg/zope/configuration/config.py",
line 686, in finish
actions = self.handler(context, **args)
File
"/home/david/ticketcollector/eggs/zope.configuration-3.7.2-py2.6.egg/zope/configuration/xmlconfig.py",
line 550, in include
processxmlfile(f, context)
File
"/home/david/ticketcollector/eggs/zope.configuration-3.7.2-py2.6.egg/zope/configuration/xmlconfig.py",
line 382, in processxmlfile
parser.parse(src)
File "/usr/lib/python2.6/xml/sax/expatreader.py", line 107, in parse
xmlreader.IncrementalParser.parse(self, source)
File "/usr/lib/python2.6/xml/sax/xmlreader.py", line 123, in parse
self.feed(buffer)
File "/usr/lib/python2.6/xml/sax/expatreader.py", line 207, in feed
self._parser.Parse(data, isFinal)
File "/usr/lib/python2.6/xml/sax/expatreader.py", line 349, in
end_element_ns
self._cont_handler.endElementNS(pair, None)
File
"/home/david/ticketcollector/eggs/zope.configuration-3.7.2-py2.6.egg/zope/configuration/xmlconfig.py",
line 361, in endElementNS
self.context.end()
File
"/home/david/ticketcollector/eggs/zope.configuration-3.7.2-py2.6.egg/zope/configuration/config.py",
line 538, in end
self.stack.pop().finish()
File
"/home/david/ticketcollector/eggs/zope.configuration-3.7.2-py2.6.egg/zope/configuration/config.py",
line 685, in finish
args = toargs(context, *self.argdata)
File
"/home/david/ticketcollector/eggs/zope.configuration-3.7.2-py2.6.egg/zope/configuration/config.py",
line 1377, in toargs
args[str(name)] = field.fromUnicode(s)
File
"/home/david/ticketcollector/eggs/zope.configuration-3.7.2-py2.6.egg/zope/configuration/fields.py",
line 139, in fromUnicode
value = self.context.resolve(name)
File
"/home/david/ticketcollector/eggs/zope.configuration-3.7.2-py2.6.egg/zope/configuration/config.py",
line 181, in resolve
mod = __import__(mname, *_import_chickens)
File "/home/david/ticketcollector/src/tc/collector/views.py", line 8, in
<module>
class AddTicketCollector(form.AddForm):
File "/home/david/ticketcollector/src/tc/collector/views.py", line 12, in
AddTicketCollector
template = ViewPageTemplateFile("addcollector.pt")
zope.configuration.xmlconfig.ZopeXMLConfigurationError: File
"/home/david/ticketcollector/etc/site.zcml", line 52.2-52.31
ZopeXMLConfigurationError: File
"/home/david/ticketcollector/src/tc/main/configure.zcml", line 24.2-24.36
ZopeXMLConfigurationError: File
"/home/david/ticketcollector/src/tc/collector/configure.zcml", line
28.0-33.5
NameError: name 'ViewPageTemplateFile' is not defined


Experts please help!

David
Edoardo Serra
2010-10-25 16:01:41 UTC
Permalink
Oh yes, there's an import line missing in the tutorial

You should add the following line in the import section at the beginning of your fille (tc/collector/views.py)

from zope.browserpage import ViewPageTemplateFile

Hope it helps

Regards

Edoardo
Post by david ally
Hi Zopeist,
I was following the bluebream tutorial and could not start my server after all the study; below is the error; This is the link to the tutorial I was working on- http://bluebream.zope.org/doc/1.0/tutorial1.html
------
2010-10-25T16:43:47 WARNING root Developer mode is enabled: this is a security risk and should NOT be enabled on production servers. Developer mode can usually be turned off by setting the `devmode` option to `off` or by removing it from the instance configuration file completely.
File "./bin/paster", line 117, in <module>
paste.script.command.run()
File "/home/david/ticketcollector/eggs/PasteScript-1.7.3-py2.6.egg/paste/script/command.py", line 84, in run
invoke(command, command_name, options, args[1:])
File "/home/david/ticketcollector/eggs/PasteScript-1.7.3-py2.6.egg/paste/script/command.py", line 123, in invoke
exit_code = runner.run(args)
File "/home/david/ticketcollector/eggs/PasteScript-1.7.3-py2.6.egg/paste/script/command.py", line 218, in run
result = self.command()
File "/home/david/ticketcollector/eggs/PasteScript-1.7.3-py2.6.egg/paste/script/serve.py", line 276, in command
relative_to=base, global_conf=vars)
File "/home/david/ticketcollector/eggs/PasteScript-1.7.3-py2.6.egg/paste/script/serve.py", line 313, in loadapp
**kw)
File "/home/david/ticketcollector/eggs/PasteDeploy-1.3.3-py2.6.egg/paste/deploy/loadwsgi.py", line 204, in loadapp
return loadobj(APP, uri, name=name, **kw)
File "/home/david/ticketcollector/eggs/PasteDeploy-1.3.3-py2.6.egg/paste/deploy/loadwsgi.py", line 225, in loadobj
return context.create()
File "/home/david/ticketcollector/eggs/PasteDeploy-1.3.3-py2.6.egg/paste/deploy/loadwsgi.py", line 625, in create
return self.object_type.invoke(self)
File "/home/david/ticketcollector/eggs/PasteDeploy-1.3.3-py2.6.egg/paste/deploy/loadwsgi.py", line 177, in invoke
next_app = context.next_context.create()
File "/home/david/ticketcollector/eggs/PasteDeploy-1.3.3-py2.6.egg/paste/deploy/loadwsgi.py", line 625, in create
return self.object_type.invoke(self)
File "/home/david/ticketcollector/eggs/PasteDeploy-1.3.3-py2.6.egg/paste/deploy/loadwsgi.py", line 188, in invoke
filtered = context.next_context.create()
File "/home/david/ticketcollector/eggs/PasteDeploy-1.3.3-py2.6.egg/paste/deploy/loadwsgi.py", line 625, in create
return self.object_type.invoke(self)
File "/home/david/ticketcollector/eggs/PasteDeploy-1.3.3-py2.6.egg/paste/deploy/loadwsgi.py", line 110, in invoke
return fix_call(context.object, context.global_conf, **context.local_conf)
File "/home/david/ticketcollector/eggs/PasteDeploy-1.3.3-py2.6.egg/paste/deploy/util/fixtypeerror.py", line 57, in fix_call
val = callable(*args, **kw)
File "/home/david/ticketcollector/src/tc/main/startup.py", line 5, in application_factory
return zope.app.wsgi.getWSGIApplication(zope_conf)
File "/home/david/ticketcollector/eggs/zope.app.wsgi-3.9.2-py2.6.egg/zope/app/wsgi/__init__.py", line 162, in getWSGIApplication
db = config(configfile, schemafile, features)
File "/home/david/ticketcollector/eggs/zope.app.wsgi-3.9.2-py2.6.egg/zope/app/wsgi/__init__.py", line 150, in config
appsetup.config(options.site_definition, features=features)
File "/home/david/ticketcollector/eggs/zope.app.appsetup-3.14.0-py2.6.egg/zope/app/appsetup/appsetup.py", line 111, in config
context = xmlconfig.file(file, context=context, execute=execute)
File "/home/david/ticketcollector/eggs/zope.configuration-3.7.2-py2.6.egg/zope/configuration/xmlconfig.py", line 651, in file
include(context, name, package)
File "/home/david/ticketcollector/eggs/zope.configuration-3.7.2-py2.6.egg/zope/configuration/xmlconfig.py", line 550, in include
processxmlfile(f, context)
File "/home/david/ticketcollector/eggs/zope.configuration-3.7.2-py2.6.egg/zope/configuration/xmlconfig.py", line 382, in processxmlfile
parser.parse(src)
File "/usr/lib/python2.6/xml/sax/expatreader.py", line 107, in parse
xmlreader.IncrementalParser.parse(self, source)
File "/usr/lib/python2.6/xml/sax/xmlreader.py", line 123, in parse
self.feed(buffer)
File "/usr/lib/python2.6/xml/sax/expatreader.py", line 207, in feed
self._parser.Parse(data, isFinal)
File "/usr/lib/python2.6/xml/sax/expatreader.py", line 349, in end_element_ns
self._cont_handler.endElementNS(pair, None)
File "/home/david/ticketcollector/eggs/zope.configuration-3.7.2-py2.6.egg/zope/configuration/xmlconfig.py", line 361, in endElementNS
self.context.end()
File "/home/david/ticketcollector/eggs/zope.configuration-3.7.2-py2.6.egg/zope/configuration/config.py", line 538, in end
self.stack.pop().finish()
File "/home/david/ticketcollector/eggs/zope.configuration-3.7.2-py2.6.egg/zope/configuration/config.py", line 686, in finish
actions = self.handler(context, **args)
File "/home/david/ticketcollector/eggs/zope.configuration-3.7.2-py2.6.egg/zope/configuration/xmlconfig.py", line 550, in include
processxmlfile(f, context)
File "/home/david/ticketcollector/eggs/zope.configuration-3.7.2-py2.6.egg/zope/configuration/xmlconfig.py", line 382, in processxmlfile
parser.parse(src)
File "/usr/lib/python2.6/xml/sax/expatreader.py", line 107, in parse
xmlreader.IncrementalParser.parse(self, source)
File "/usr/lib/python2.6/xml/sax/xmlreader.py", line 123, in parse
self.feed(buffer)
File "/usr/lib/python2.6/xml/sax/expatreader.py", line 207, in feed
self._parser.Parse(data, isFinal)
File "/usr/lib/python2.6/xml/sax/expatreader.py", line 349, in end_element_ns
self._cont_handler.endElementNS(pair, None)
File "/home/david/ticketcollector/eggs/zope.configuration-3.7.2-py2.6.egg/zope/configuration/xmlconfig.py", line 361, in endElementNS
self.context.end()
File "/home/david/ticketcollector/eggs/zope.configuration-3.7.2-py2.6.egg/zope/configuration/config.py", line 538, in end
self.stack.pop().finish()
File "/home/david/ticketcollector/eggs/zope.configuration-3.7.2-py2.6.egg/zope/configuration/config.py", line 686, in finish
actions = self.handler(context, **args)
File "/home/david/ticketcollector/eggs/zope.configuration-3.7.2-py2.6.egg/zope/configuration/xmlconfig.py", line 550, in include
processxmlfile(f, context)
File "/home/david/ticketcollector/eggs/zope.configuration-3.7.2-py2.6.egg/zope/configuration/xmlconfig.py", line 382, in processxmlfile
parser.parse(src)
File "/usr/lib/python2.6/xml/sax/expatreader.py", line 107, in parse
xmlreader.IncrementalParser.parse(self, source)
File "/usr/lib/python2.6/xml/sax/xmlreader.py", line 123, in parse
self.feed(buffer)
File "/usr/lib/python2.6/xml/sax/expatreader.py", line 207, in feed
self._parser.Parse(data, isFinal)
File "/usr/lib/python2.6/xml/sax/expatreader.py", line 349, in end_element_ns
self._cont_handler.endElementNS(pair, None)
File "/home/david/ticketcollector/eggs/zope.configuration-3.7.2-py2.6.egg/zope/configuration/xmlconfig.py", line 361, in endElementNS
self.context.end()
File "/home/david/ticketcollector/eggs/zope.configuration-3.7.2-py2.6.egg/zope/configuration/config.py", line 538, in end
self.stack.pop().finish()
File "/home/david/ticketcollector/eggs/zope.configuration-3.7.2-py2.6.egg/zope/configuration/config.py", line 685, in finish
args = toargs(context, *self.argdata)
File "/home/david/ticketcollector/eggs/zope.configuration-3.7.2-py2.6.egg/zope/configuration/config.py", line 1377, in toargs
args[str(name)] = field.fromUnicode(s)
File "/home/david/ticketcollector/eggs/zope.configuration-3.7.2-py2.6.egg/zope/configuration/fields.py", line 139, in fromUnicode
value = self.context.resolve(name)
File "/home/david/ticketcollector/eggs/zope.configuration-3.7.2-py2.6.egg/zope/configuration/config.py", line 181, in resolve
mod = __import__(mname, *_import_chickens)
File "/home/david/ticketcollector/src/tc/collector/views.py", line 8, in <module>
File "/home/david/ticketcollector/src/tc/collector/views.py", line 12, in AddTicketCollector
template = ViewPageTemplateFile("addcollector.pt")
zope.configuration.xmlconfig.ZopeXMLConfigurationError: File "/home/david/ticketcollector/etc/site.zcml", line 52.2-52.31
ZopeXMLConfigurationError: File "/home/david/ticketcollector/src/tc/main/configure.zcml", line 24.2-24.36
ZopeXMLConfigurationError: File "/home/david/ticketcollector/src/tc/collector/configure.zcml", line 28.0-33.5
NameError: name 'ViewPageTemplateFile' is not defined
Experts please help!
David
_______________________________________________
Zope3-users mailing list
https://mail.zope.org/mailman/listinfo/zope3-users
Edoardo Serra

SATISFLY Limited
66/F The Center
99 Queen's Road Central
Hong Kong

http://www.satisfly.com/airline

Loading...