first time dev-install => AttributeError 'NoneType' object has no attribute 'startswith'

23 views
Skip to first unread message

Stephen Bannasch

unread,
Nov 14, 2009, 12:21:11 AM11/14/09
to bes...@googlegroups.com
I saw the bespin had started the work to integrate sproutcore and want to see how the work was progressing ...

I was following the instructions on this page to setup bespin:

https://wiki.mozilla.org/Labs/Bespin/DeveloperGuide/Setup

and the process generated this error and stopped:

AttributeError: 'NoneType' object has no attribute 'startswith'

Full console log here: http://gist.github.com/234380

My system is MacOS 10.5.8.

Here's the truncated version:

[bespinclient]$ python bootstrap.py --no-site-packages
New python executable in ./bin/python
Installing setuptools...........................done.
Searching for paver==1.0.1

... snip ...

Adding Paver 1.0.1 to easy-install.pth file
Installing paver script to /Users/stephen/dev/test/bespin/bespinclient/bin

Installed /Users/stephen/dev/test/bespin/bespinclient/lib/python2.5/site-packages/Paver-1.0.1-py2.5.egg
Processing dependencies for paver==1.0.1
Finished processing dependencies for paver==1.0.1
---> pavement.initial
---> pavement.install_sproutcore
download sproutcore-abbot/tiki


Captured Task Output:
---------------------

---> pavement.initial

... snip ...

File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/posixpath.py", line 49, in isabs
return s.startswith('/')
AttributeError: 'NoneType' object has no attribute 'startswith'

Kevin Dangoor

unread,
Nov 16, 2009, 10:50:17 AM11/16/09
to bes...@googlegroups.com
On Sat, Nov 14, 2009 at 12:21 AM, Stephen Bannasch <stephen....@deanbrook.org> wrote:
I saw the bespin had started the work to integrate sproutcore and want to see how the work was progressing ...

I was following the instructions on this page to setup bespin:

  https://wiki.mozilla.org/Labs/Bespin/DeveloperGuide/Setup

and the process generated this error and stopped:

  AttributeError: 'NoneType' object has no attribute 'startswith'

Full console log here: http://gist.github.com/234380

I have a similar setup and I just tried this myself. I'd say try it again. It's possible that this error may just be a bad way of reporting a problem with GitHub (where sproutcore is downloaded from).

For me, just now, I had no trouble getting past this initial setup step.

Kevin

--
Kevin Dangoor

work: http://labs.mozilla.com/
email: k...@blazingthings.com
blog: http://www.BlueSkyOnMars.com

Stephen Bannasch

unread,
Nov 16, 2009, 12:14:53 PM11/16/09
to bes...@googlegroups.com
>On Sat, Nov 14, 2009 at 12:21 AM, Stephen Bannasch <<mailto:stephen....@deanbrook.org>stephen....@deanbrook.org> wrote:
>
>I saw the bespin had started the work to integrate sproutcore and want to see how the work was progressing ...
>
>I was following the instructions on this page to setup bespin:
> <https://wiki.mozilla.org/Labs/Bespin/DeveloperGuide/Setup>https://wiki.mozilla.org/Labs/Bespin/DeveloperGuide/Setup
>
>and the process generated this error and stopped:
>
> AttributeError: 'NoneType' object has no attribute 'startswith'
>
>Full console log here: <http://gist.github.com/234380>http://gist.github.com/234380
>
>
>I have a similar setup and I just tried this myself. I'd say try it again. It's possible that this error may just be a bad way of reporting a problem with GitHub (where sproutcore is downloaded from).
>
>For me, just now, I had no trouble getting past this initial setup step.

Hi Kevin,

I just deleted the whole bespin dir and tried again and got the same error:

mkdir bespin
cd bespin
hg clone http://hg.mozilla.org/labs/bespinclient
hg clone http://hg.mozilla.org/labs/bespinserver
cd bespinclient
python bootstrap.py --no-site-package

Ends up generating this error on line 164, in _run_task in paver/tasks.py:

AttributeError: 'NoneType' object has no attribute 'startswith'

on line 164 in:

lib/python2.5/site-packages/Paver-1.0.1-py2.5.egg/paver/tasks.py

I'm not that familiar with Python (or Paver) -- but it has the flavor of a missing library -- perhaps in my setup of Python... but I'm grasping at straws ???

Kevin Dangoor

unread,
Nov 16, 2009, 1:41:26 PM11/16/09
to bes...@googlegroups.com
On Mon, Nov 16, 2009 at 12:14 PM, Stephen Bannasch <stephen....@deanbrook.org> wrote:
Ends up generating this error on line 164, in _run_task in paver/tasks.py:
 AttributeError: 'NoneType' object has no attribute 'startswith'

on line 164 in:

 lib/python2.5/site-packages/Paver-1.0.1-py2.5.egg/paver/tasks.py

I'm not that familiar with Python (or Paver) -- but it has the flavor of a missing library -- perhaps in my setup of Python... but I'm grasping at straws ???


Interesting! It looks like I was running it using Python 2.6, which appears to behave differently here than 2.5 (which is what Mac OS comes with).

I just checked in a change that tested fine for me using /usr/bin/python.

Stephen Bannasch

unread,
Nov 18, 2009, 12:48:35 AM11/18/09
to bes...@googlegroups.com
At 1:41 PM -0500 11/16/09, Kevin Dangoor wrote:
>Interesting! It looks like I was running it using Python 2.6, which appears to behave differently here than 2.5 (which is what Mac OS comes with).
>
>I just checked in a change that tested fine for me using /usr/bin/python.

Thanks Kevin,

I updated and was able to complete the install and then start the server but dojo seems to be missing.

$ paver start
---> pavement.start
---> pavement.start
serving on http://127.0.0.1:8080
SproutCore v1.0.1033 Development Server
Starting server at http://0.0.0.0:4020 in debug mode
To quit sc-server, press Control-C
>> Thin web server (v1.0.0 codename That's What She Said)
>> Maximum connections set to 1024
>> Listening on 0.0.0.0:4020, CTRL+C to stop

When I load the page: http://127.0.0.1:8080/

I get a long list of errors in the console starting with:

[Errno 2] No such file or directory: '../bespinclient/src/html/dojo/fx/easing.js'
127.0.0.1 - - [18/Nov/2009:00:44:04 -0400] "GET /dojo/fx/easing.js HTTP/1.1" 404 - "http://127.0.0.1:8080/" "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1.5) Gecko/20091102 Firefox/3.5.5"
[Errno 2] No such file or directory: '../bespinclient/src/html/dojo/dojo.js.uncompressed.js'

There is actually no dojo library present:

[bespin]$ ls bespinclient/src/html
bespin.css firefox.png index.html loader.js qunit.css scroller.html sproutcore.css test.html

Here's the complete console log with all the errors -- perhaps getting dojo installed will fix most of them ... ?

Stephen Bannasch

unread,
Nov 18, 2009, 1:20:32 AM11/18/09
to bes...@googlegroups.com
At 12:48 AM -0500 11/18/09, Stephen Bannasch wrote:
>Here's the complete console log with all the errors -- perhaps getting dojo installed will fix mostof them ... ?

http://gist.github.com/237592

Kevin Dangoor

unread,
Nov 18, 2009, 9:20:38 AM11/18/09
to bes...@googlegroups.com
On Wed, Nov 18, 2009 at 12:48 AM, Stephen Bannasch <stephen....@deanbrook.org> wrote:
When I load the page: http://127.0.0.1:8080/

I get a long list of errors in the console starting with:

[Errno 2] No such file or directory: '../bespinclient/src/html/dojo/fx/easing.js'
127.0.0.1 - - [18/Nov/2009:00:44:04 -0400] "GET /dojo/fx/easing.js HTTP/1.1" 404 - "http://127.0.0.1:8080/" "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1.5) Gecko/20091102 Firefox/3.5.5"
[Errno 2] No such file or directory: '../bespinclient/src/html/dojo/dojo.js.uncompressed.js'

There is actually no dojo library present:


Dojo is gone.

Try removing the tmp directory in bespinclient. I was able to reproduce these errors and then got it to work by removing the tmp directory.

Kevin

Stephen Bannasch

unread,
Nov 18, 2009, 2:02:00 PM11/18/09
to bes...@googlegroups.com
At 9:20 AM -0500 11/18/09, Kevin Dangoor wrote:
>Dojo is gone.
>
>Try removing the tmp directory in bespinclient. I was able to reproduce these errors and then got it to work by removing the tmpdirectory.
>
>Kevin

Thanks again Kevin,

There doesn't appear to be a tmp dir in the tree:

[bespin]$ ls
bespinclient bespinserver

[bespin]$ find . -name tmp -type d


nothing was found ...

Kevin Dangoor

unread,
Nov 18, 2009, 2:15:23 PM11/18/09
to bes...@googlegroups.com
On Wed, Nov 18, 2009 at 2:02 PM, Stephen Bannasch <stephen....@deanbrook.org> wrote:
There doesn't appear to be a tmp dir in the tree:

 [bespin]$ ls
 bespinclient  bespinserver

 [bespin]$ find . -name tmp -type d


nothing was found ...

Strange.... a tmp directory is created by sc-server.

I noticed your sc-server output mentioned that it ran "thin" (mine is apparently using webrick). I'm not sure if there are any differences there. I wouldn't expect differences.

What I do know is that this morning after reading your email, I deleted abbot, frameworks/sproutcore and frameworks/tiki and then re-ran paver install_sproutcore. After doing that, I was getting errors just like the ones you got. I delete the tmp directory and it was fine.

Stephen Bannasch

unread,
Nov 18, 2009, 3:31:59 PM11/18/09
to bes...@googlegroups.com
At 2:15 PM -0500 11/18/09, Kevin Dangoor wrote:
On Wed, Nov 18, 2009 at 2:02 PM, Stephen Bannasch <stephen....@deanbrook.org> wrote:
There doesn't appear to be a tmp dir in the tree:

 [bespin]$ ls
 bespinclient  bespinserver

 [bespin]$ find . -name tmp -type d


nothing was found ...

Strange.... a tmp directory is created by sc-server.

I noticed your sc-server output mentioned that it ran "thin" (mine is apparently using webrick). I'm not sure if thereare any differences there. I wouldn't expect differences.

Thin is another Ruby web server. If installed as a gem it will be used instead of webbrick, see: https://wiki.mozilla.org/Labs/Bespin/DeveloperGuide/Setup

I just realized that I'm generating the dojo errors opening the server running at 8080.

  ---> pavement.start
  serving on http://127.0.0.1:8080
  SproutCore v1.0.1033 Development Server
  Starting server at http://0.0.0.0:4020 in debug mode
  To quit sc-server, press Control-C
I looked at the first url and opened that and didn't notice the second for connecting to SproutCore.

If I instead connect to the SproutCore server running on 4020 I don't get Dojo errors (and a tmp/ directory is generated).

What is the server is running on 8080?

FYI, there are still many files that refer to Dojo:

(bespinclient)[bespinclient]$ ack -l dojo
abbot/vendor/jsdoc/app/plugins/functionCall.js
frameworks/bespin/events.js
frameworks/bespin/util/hub.js
frameworks/bespin/util/keys.js
frameworks/bespin/util/util.js
lib/python2.5/site-packages/paste/evalexception/mochikit/__package__.js
lib/python2.5/site-packages/paste/evalexception/mochikit/MochiKit.js
src/bespin-build/lib/bespin/builder.js
src/bespin-labs/lib/bespin/debug.js
src/bespin-labs/lib/bespin/deploy.js
src/bespin-labs/lib/bespin/editor/piemenu.js
src/bespin-labs/lib/bespin/jetpack.js
src/bespin-labs/lib/bespin/page/editor/init.js
src/bespin-labs/lib/bespin/page/index/init.js
src/bespin-labs/lib/bespin/parser/parser.js
src/bespin-labs/lib/bespin/social.js
src/bespin-labs/lib/bespin/test.js
src/bespin-labs/lib/bespin/util/webpieces.js
src/bespin-labs/lib/bespin/util/worker.js
src/bespin-labs/lib/bespin/vcs.js
src/bespin-supported/lib/bespin/client/server.js
src/bespin-supported/lib/bespin/client/session.js
src/bespin-supported/lib/bespin/client/status.js
src/bespin-supported/lib/bespin/cmd/commandline.js
src/bespin-supported/lib/bespin/cmd/debug.js
src/bespin-supported/lib/bespin/cmd/file.js
src/bespin-supported/lib/bespin/cmd/other.js
src/bespin-supported/lib/bespin/cmd/project.js
src/bespin-supported/lib/bespin/filepopup.js
src/bespin-supported/lib/bespin/popup.js
src/bespin-supported/lib/bespin/preview.js
src/bespin-supported/lib/bespin/quickopen.js
src/bespin-supported/lib/bespin/toolbar.js
src/bespin-supported/lib/bespin/user/register.js
src/bespin-supported/lib/bespin/user/utils.js
src/bespin-supported/lib/bespin/wizard.js
src/html/index.html
tmp/debug/build/static/bespin/en/current/source/events.js
tmp/debug/build/static/bespin/en/current/source/util/hub.js
tmp/debug/build/static/bespin/en/current/source/util/keys.js
tmp/debug/build/static/bespin/en/current/source/util/util.js
tmp/debug/staging/static/bespin/en/current/events.js
tmp/debug/staging/static/bespin/en/current/util/hub.js
tmp/debug/staging/static/bespin/en/current/util/keys.js
tmp/debug/staging/static/bespin/en/current/util/util.js

Kevin Dangoor

unread,
Nov 18, 2009, 9:06:42 PM11/18/09
to bes...@googlegroups.com
On Wed, Nov 18, 2009 at 3:31 PM, Stephen Bannasch <stephen....@deanbrook.org> wrote:

Thin is another Ruby web server. If installed as a gem it will be used instead of webbrick, see: https://wiki.mozilla.org/Labs/Bespin/DeveloperGuide/Setup


Heh. That note was actually added to the Setup page after your earlier message. This was actually quite a handy thing to learn, as Thin is much faster.
 
I just realized that I'm generating the dojo errors opening the server running at 8080.

aha! This makes sense. It's tempting to flop the ports... 4020 is the sproutcore standard port. sproutcore actually proxies server calls over to 8080, which is where the Bespin Python server runs.


  ---> pavement.start
  serving on http://127.0.0.1:8080
  SproutCore v1.0.1033 Development Server
  Starting server at http://0.0.0.0:4020 in debug mode
  To quit sc-server, press Control-C
 
FYI, there are still many files that refer to Dojo:


Yeah, we have a lot of work to do still... All of those references are in files that are becoming plugins.

Kevin
Reply all
Reply to author
Forward
0 new messages