[BlueBream] buildout error creating sampleproject

George Wright georgewr at bigpond.net.au
Thu May 12 08:23:08 EDT 2011


OK
Doing the excellent Bluebream Tutorial "ticketcollector"
5. Tutorial — Part 1 — BlueBream v1.0b4 documentation
I found the answers to my previous bzr questions at section 5.2.2 - OK I understand.

I have a few other comments which I hope might help in a revision of the Tutorial 1  :......

1.	When I got to section 5.2.5 and did the ./bin/buildout
it went into the same loop as reported previously below.
What I had to do was:
•	stop the buildout
•	quit from Terminal
•	restart Terminal
• 	cd to the project
•	./bin/buildout
and everything went fine.

If that's something not unique to my particular set up it might be helpful
to add a note to quit and restart terminal in the tutorial ?

2.	I n section 5.4, I don't have a file ./etc/zope.conf  the tutorial refers to !
There is etc/zope-debug.conf and etc/zope-deploy.conf but no zope.conf here!
3.	Nor is there an etc/site.zcml (Section 5.5)
geomacbk:ticketcollector georgewr$ ls ./etc
debug.zcml		deploy.zcml		zope-debug.conf		zope-deploy.conf
4.	I wonder if anything has changed since bluebream-1.0b4 ??
I can locate plenty of zope.conf files in projects for earlier zope & bluebream versions but not in this ticketcollector project
which uses bluebream 1.0
5.	Most of what the tutorial (5.5) describes as the contents of etc/site.zcml is actually in the file
src/tc/main/bluebream.zcml
6.	Most of what the same section describes as the contents of src/tc/collector/configure.zcml is
actually in the file src/tc/main/configure.zcml
And I guess there are other matches - so the tutorial needs to be updated.
7.	Just near the end of section 5.8.1 we create a persistent container "c1"
"Now if you exit the debug prompt and open it again, you will see that you can access the persistent object:

$ ./bin/paster shell debug.ini
...
Welcome to the interactive debug prompt.
The 'root' variable contains the ZODB root folder.
The 'app' variable contains the Debugger, 'app.publish(path)' simulates a request.
>>> root['c1']
<tc.main.MyContainer object at 0x96091ac>
"
That's OK except I get a "zc.lockfile.LockError: Couldn't lock 'var/filestorage/Data.fs.lock'"
 error and have to delete the "var/filestorage/Data.fs.lock" first. Maybe that deserves a mention in the tutorial
as it occurs often.

8.	In section 5.8.5 the src/tc/collector/views.py file must have this line added:
from zope.app.pagetemplate.viewpagetemplatefile import ViewPageTemplateFile

9.	Towards the end of 5.8.5 the tutorial suggests viewing http://localhost:8080/@@add_ticket_collector
After adding an object with a name and description it comes up with a debug error screen 
NotFound: Object: <tc.collector.ticketcollector.Collector object at 0x10115c500>, name: u'@@index'
It's disconcerting that the explanation for that error doesn't happen until 5.8.6
When I start up the shell I found a half dozen objects were created as I fiddled with the "add ticket collector" form:
>> list(root.keys())
[u'fred', u'freddy', u'george', u'georges app', u'gfc', u'mycollector']
>>> 

I think this is a good tutorial as it makes a fine attempt to explain what is going on rather than simply
set out a set of mysterious steps to follow. I hope my comments are helpful.

Regards
George

On 11/05/2011, at 2:00 AM, bluebream-request at zope.org wrote:
> 
> Date: Tue, 10 May 2011 21:32:20 +1000
> From: George Wright <georgewr at bigpond.net.au>
> Subject: Re: [BlueBream] buildout error creating sampleproject
> To: bluebream at zope.org
> Message-ID: <949F579C-24DE-408A-95C4-221FF05D6B8A at bigpond.net.au>
> Content-Type: text/plain; charset=us-ascii
> 
> Thanks Christophe
> some comments below.
> George
> 
> On 09/05/2011, at 2:00 AM, bluebream-request at zope.org wrote:
> 
>> Message: 1
>> Date: Sun, 8 May 2011 13:45:06 +1000
>> From: George Wright <georgewr at bigpond.net.au>
>> Subject: [BlueBream] buildout error creating sampleproject
>> To: bluebream at zope.org
>> Message-ID: <A06CA923-1FCA-4C93-A131-CFB925581E0A at bigpond.net.au>
>> Content-Type: text/plain; charset="windows-1252"
>> 
>> Following the screencast Installing BlueBream Screencasts ? BlueBream v1.0 documentation
>> Using a newly installed Bluebream 1.0 on OSX 10.6.7
>> 
>> When I get to the ./bin/buildout stage it goes into an  loop (infinite?) where it seems to be unhappy 
>> using both 'distribute-0.6.14' and 'setuptools version 0.6c11'
>> Any suggestions?
>> 
>> geomacbk:sampleproject georgewr$ sudo python bootstrap.py
>> Password:
>> Creating directory '/Users/georgewr/sampleproject/bin'.
>> Creating directory '/Users/georgewr/sampleproject/parts'.
>> Creating directory '/Users/georgewr/sampleproject/develop-eggs'.
>> Generated script '/Users/georgewr/sampleproject/bin/buildout'.
>> geomacbk:sampleproject georgewr$ sudo ./bin/buildout
>> /Users/georgewr/sampleproject/parts/buildout/site.py:262: UserWarning: Module pkg_resources was already imported from /System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/pkg_resources.pyc, but /Users/georgewr/.buildout/eggs/distribute-0.6.14-py2.6.egg is being added to sys.path
>> import pkg_resources
>> /Users/georgewr/sampleproject/parts/buildout/site.py:262: UserWarning: Module site was already imported from /Users/georgewr/sampleproject/parts/buildout/site.py, but /Users/georgewr/.buildout/eggs/distribute-0.6.14-py2.6.egg is being added to sys.path
>> import pkg_resources
>> Upgraded:
>> setuptools version 0.6c11;
>> restarting.
>> Generated script '/Users/georgewr/sampleproject/bin/buildout'.
>> /Users/georgewr/sampleproject/parts/buildout/site.py:262: UserWarning: Module pkg_resources was already imported from /System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/pkg_resources.pyc, but /Users/georgewr/.buildout/eggs/distribute-0.6.14-py2.6.egg is being added to sys.path
>> import pkg_resources
>> /Users/georgewr/sampleproject/parts/buildout/site.py:262: UserWarning: Module site was already imported from /Users/georgewr/sampleproject/parts/buildout/site.pyc, but /Users/georgewr/.buildout/eggs/distribute-0.6.14-py2.6.egg is being added to sys.path
>> import pkg_resources
>> Upgraded:
>> setuptools version 0.6c11;
>> ....
>> etc
>> 
>> Message: 2
>> Date: Sun, 08 May 2011 10:16:39 +0200
>> From: Christophe Combelles <ccomb at free.fr>
>> Subject: Re: [BlueBream] buildout error creating sampleproject
>> To: bluebream at zope.org
>> Message-ID: <4DC65167.5040800 at free.fr>
>> Content-Type: text/plain; charset=UTF-8; format=flowed
>> 
>> Le 08/05/2011 05:45, George Wright a ?crit :
>>> Following the screencast Installing BlueBream Screencasts ? BlueBream v1.0
>>> documentation <http://bluebream.zope.org/screencasts.html>
>>> Using a newly installed Bluebream 1.0 on OSX 10.6.7
>>> 
>>> When I get to the ./bin/buildout stage it goes into an loop (infinite?) where it
>>> seems to be unhappy
>>> using both 'distribute-0.6.14' and 'setuptools version 0.6c11'
>>> Any suggestions?
>>> 
>>> geomacbk:sampleproject georgewr$ sudo python bootstrap.py
>> 
>> Why sudo ? The bootstrap purpose is to install buildout in a sandbox so that you 
>> don't have to be administrator.
> 
> OK Christophe. I started again and this time did the python bootstrap.py  without sudo.
> That did make quite a big difference! All running ok now.
> However a couple of questions;
> I could not follow the purpose of these steps:
> rm -fr src/sampleproject.egg-info/,
> bzr init
> bzr add *
> bzr ci
> As well the "initial commit " insert into the bzr_log file. I've not used bzr before and as there is no audio on the screencast I didn't follow what was going on. I guess it is to do with version control and not actually coding the project - and I guess these steps could be omitted without ill effect?
> 
> 
>> The loop below is the sign of a conflict between Distribute and a system-wide 
>> setuptools, or something like that.
>> First try to recreate your sample app from scratch. If this occurs again, try to 
>> upgrade your system-wide setuptools or distribute (this time with a sudo: sudo 
>> easy_install --upgrade distribute, or sudo pip install --upgrade distribute).
>> 
>> 
>>> Password:
>>> Creating directory '/Users/georgewr/sampleproject/bin'.
>>> Creating directory '/Users/georgewr/sampleproject/parts'.
>>> Creating directory '/Users/georgewr/sampleproject/develop-eggs'.
>>> Generated script '/Users/georgewr/sampleproject/bin/buildout'.
>>> geomacbk:sampleproject georgewr$ sudo ./bin/buildout
>>> /Users/georgewr/sampleproject/parts/buildout/site.py:262: UserWarning: Module
>>> pkg_resources was already imported from
>>> /System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/pkg_resources.pyc,
>>> but /Users/georgewr/.buildout/eggs/distribute-0.6.14-py2.6.egg is being added to
>>> sys.path
>>> import pkg_resources
>>> /Users/georgewr/sampleproject/parts/buildout/site.py:262: UserWarning: Module
>>> site was already imported from
>>> /Users/georgewr/sampleproject/parts/buildout/site.py, but
>>> /Users/georgewr/.buildout/eggs/distribute-0.6.14-py2.6.egg is being added to
>>> sys.path
>>> import pkg_resources
>>> Upgraded:
>>> setuptools version 0.6c11;
>>> restarting.
>>> Generated script '/Users/georgewr/sampleproject/bin/buildout'.
>>> /Users/georgewr/sampleproject/parts/buildout/site.py:262: UserWarning: Module
>>> pkg_resources was already imported from
>>> /System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/pkg_resources.pyc,
>>> but /Users/georgewr/.buildout/eggs/distribute-0.6.14-py2.6.egg is being added to
>>> sys.path
>>> import pkg_resources
>>> /Users/georgewr/sampleproject/parts/buildout/site.py:262: UserWarning: Module
>>> site was already imported from
>>> /Users/georgewr/sampleproject/parts/buildout/site.pyc, but
>>> /Users/georgewr/.buildout/eggs/distribute-0.6.14-py2.6.egg is being added to
>>> sys.path
>>> import pkg_resources
>>> Upgraded:
>>> setuptools version 0.6c11;
>>> ....
>>> 
>> ****************************************
> 
> George Wright
> georgewr at bigpond.net.au
> http://www.labyrinth.net.au/~gwright
> 
> 
> 
> 
> 
> 
> 
> ------------------------------
> 
> _______________________________________________
> bluebream mailing list
> bluebream at zope.org
> https://mail.zope.org/mailman/listinfo/bluebream
> 
> 
> End of bluebream Digest, Vol 17, Issue 2
> ****************************************

George Wright
georgewr at bigpond.net.au
http://www.labyrinth.net.au/~gwright





-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.zope.org/pipermail/bluebream/attachments/20110512/5ef90c3c/attachment-0001.html 


More information about the bluebream mailing list