Difficulty with "inconsistent use of tabs and spaces in indentation" in file called

2008-02-11 Thread ibloom
I've been trying for a couple days to build a program using pyObjC on
a mac, I'm stuck on this error:

: inconsistent use of tabs and spaces in indentation
Traceback (most recent call last):
  File "setup.py", line 59, in ?
setup(**setup_options)
  File "/Library/Frameworks/Python.framework/Versions/2.4//lib/
python2.4/distutils/core.py", line 149, in setup
dist.run_commands()
  File "/Library/Frameworks/Python.framework/Versions/2.4//lib/
python2.4/distutils/dist.py", line 946, in run_commands
self.run_command(cmd)
  File "/Library/Frameworks/Python.framework/Versions/2.4//lib/
python2.4/distutils/dist.py", line 966, in run_command
cmd_obj.run()
  File "/Library/Frameworks/Python.framework/Versions/2.4/lib/
python2.4/site-packages/py2app/py2app/build_app.py", line 342, in run
self.initialize_plist()
  File "/Library/Frameworks/Python.framework/Versions/2.4/lib/
python2.4/site-packages/py2app/py2app/build_app.py", line 415, in
initialize_plist
plist = self.get_default_plist()
  File "/Library/Frameworks/Python.framework/Versions/2.4/lib/
python2.4/site-packages/py2app/py2app/build_app.py", line 294, in
get_default_plist
version = find_version(target.script)
  File "/Library/Frameworks/Python.framework/Versions/2.4/lib/
python2.4/site-packages/py2app/py2app/util.py", line 13, in
find_version
ast = compiler.parseFile(fn)
  File "/Library/Frameworks/Python.framework/Versions/2.4//lib/
python2.4/compiler/transformer.py", line 48, in parseFile
return parse(src)
  File "/Library/Frameworks/Python.framework/Versions/2.4//lib/
python2.4/compiler/transformer.py", line 52, in parse
return Transformer().parsesuite(buf)
  File "/Library/Frameworks/Python.framework/Versions/2.4//lib/
python2.4/compiler/transformer.py", line 129, in parsesuite
return self.transform(parser.suite(text))
  File "", line 628
else:
^
SyntaxError: invalid syntax

I don't even know which file has the indentation problem.

Any thoughts.
Ian Bloom
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Difficulty with "inconsistent use of tabs and spaces in indentation" in file called

2008-02-11 Thread ibloom
My main problem is, I don't know where to find the file:
  File "", line 628

As in I don't know what code it is refering to by  ??
It isn't code that I wrote, its something from python or pyObjC

Ian Bloom
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Difficulty with "inconsistent use of tabs and spaces in indentation" in file called

2008-02-12 Thread ibloom
On Feb 11, 9:10 pm, "Gabriel Genellina" <[EMAIL PROTECTED]>
wrote:
> En Mon, 11 Feb 2008 21:57:00 -0200, ibloom <[EMAIL PROTECTED]> escribió:
>
> > My main problem is, I don't know where to find the file:
> >   File "", line 628
>
> > As in I don't know what code it is refering to by  ??
> > It isn't code that I wrote, its something from python or pyObjC
>
> Mmm, didn't you get my previous post? The call is inside the py2app  
> package. Quoting myself:
>
> >> : inconsistent use of tabs and spaces in indentation
> >> Traceback (most recent call last):
> >>   File "/Library/Frameworks/Python.framework/Versions/2.4/lib/
> >> python2.4/site-packages/py2app/py2app/util.py", line 13, in
> >> find_version
> >>     ast = compiler.parseFile(fn)
>
> > Put a print statement just above that line, to see which file triggers  
> > the
> > error.
>
> In case it wasn't clear, modify the file  
> /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packag 
> es/py2app/py2app/util.py,  
> around line 13, in the find_version function, adding this print statement:
>
>      print 'about to compile', fn
>      ast = compiler.parseFile(fn)
>
> The last line printed (in case there are many) should be the offending  
> filename.
>
> Of course you don't have to keep the modified library, this is just to  
> detect which file triggers the error. You should report this to the py2app  
> developers as well.
>
> --
> Gabriel Genellina

Gabriel, your the master.
Of course I didn't understand that py2app was trying to compile my own
python source code and when I switched to Xcode as my new editor, I
started mixing in tabs. So  was in fact my code. All I had to
do was change my preferences in Xcode, to generate spaces instead of
tabs, remove all of the offending tabs and voila. You've ended days of
frustrations. Thank you.

Ian Bloom
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Difficulty with "inconsistent use of tabs and spaces in indentation" in file called

2008-02-12 Thread ibloom
On Feb 11, 9:10 pm, "Gabriel Genellina" <[EMAIL PROTECTED]>
wrote:
> En Mon, 11 Feb 2008 21:57:00 -0200, ibloom <[EMAIL PROTECTED]> escribió:
>
> > My main problem is, I don't know where to find the file:
> >   File "", line 628
>
> > As in I don't know what code it is refering to by  ??
> > It isn't code that I wrote, its something from python or pyObjC
>
> Mmm, didn't you get my previous post? The call is inside the py2app  
> package. Quoting myself:
>
> >> : inconsistent use of tabs and spaces in indentation
> >> Traceback (most recent call last):
> >>   File "/Library/Frameworks/Python.framework/Versions/2.4/lib/
> >> python2.4/site-packages/py2app/py2app/util.py", line 13, in
> >> find_version
> >>     ast = compiler.parseFile(fn)
>
> > Put a print statement just above that line, to see which file triggers  
> > the
> > error.
>
> In case it wasn't clear, modify the file  
> /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packag 
> es/py2app/py2app/util.py,  
> around line 13, in the find_version function, adding this print statement:
>
>      print 'about to compile', fn
>      ast = compiler.parseFile(fn)
>
> The last line printed (in case there are many) should be the offending  
> filename.
>
> Of course you don't have to keep the modified library, this is just to  
> detect which file triggers the error. You should report this to the py2app  
> developers as well.
>
> --
> Gabriel Genellina

You are right, I didn't understand. I'll try it. Thank you.

Ian Bloom
-- 
http://mail.python.org/mailman/listinfo/python-list