'gjslint --help' command - SyntaxError: invalid syntax

519 views
Skip to first unread message

Daniel Suchý

unread,
Aug 2, 2013, 2:27:29 PM8/2/13
to closure-lin...@googlegroups.com
According to this page (https://developers.google.com/closure/utilities/docs/linter_howto) I installed Python and easy_install module on my Windows 8 64 bit. Then I tried to install gjslint with this command:

And this is the text from my command line:
Downloading http://closure-linter.googlecode.com/files/closure_linter-latest.tar.gz
Processing closure_linter-latest.tar.gz
Writing c:\users\sushi~1\appdata\local\temp\easy_install-z7bugc\closure_linter-2.3.11\setup.cfg
Running closure_linter-2.3.11\setup.py -q bdist_egg --dist-dir c:\users\sushi~1\appdata\local\temp\eas
y_install-z7bugc\closure_linter-2.3.11\egg-dist-tmp-i7d5jd
  File "build\bdist.win-amd64\egg\closure_linter\common\htmlutil.py", line 149
    except HTMLParser.HTMLParseError, e:
                                    ^
SyntaxError: invalid syntax
  File "build\bdist.win-amd64\egg\closure_linter\common\simplefileflags.py", line 171
    print 'Skipping %d file(s).' % skipped
                               ^
SyntaxError: invalid syntax
  File "build\bdist.win-amd64\egg\closure_linter\ecmalintrules.py", line 750
    except Exception, e:
                    ^
SyntaxError: invalid syntax
  File "build\bdist.win-amd64\egg\closure_linter\error_fixer.py", line 486
    print 'Fixed %d errors in %s' % (self._file_fix_count, self._file_name)
                                ^
SyntaxError: invalid syntax
  File "build\bdist.win-amd64\egg\closure_linter\gjslint.py", line 168
    print '%s: %d' % (path, len(path_errors))
                 ^
SyntaxError: invalid syntax
  File "build\bdist.win-amd64\egg\closure_linter\indentation.py", line 200
    print 'Line #%d: stack %r' % (token.line_number, stack)
                             ^
SyntaxError: invalid syntax
  File "build\bdist.win-amd64\egg\closure_linter\runner.py", line 161
    except ecmametadatapass.ParseError, parse_err:
                                      ^
SyntaxError: invalid syntax
zip_safe flag not set; analyzing archive contents...
closure-linter 2.3.11 is already the active version in easy-install.pth
Installing fixjsstyle-script.py script to c:\Program Files\Python\Scripts
Installing fixjsstyle.exe script to c:\Program Files\Python\Scripts
Installing gjslint-script.py script to c:\Program Files\Python\Scripts
Installing gjslint.exe script to c:\Program Files\Python\Scripts
Installed c:\program files\python\lib\site-packages\closure_linter-2.3.11-py3.3.egg
Processing dependencies for closure-linter==2.3.11
Finished processing dependencies for closure-linter==2.3.11


As you can see there are lot of syntax errors. When I call the command 'gjslint --help' after the installation, I can see this: 
Traceback (most recent call last):
  File "C:\Program Files\Python\Scripts\gjslint-script.py", line 9, in <module>
    load_entry_point('closure-linter==2.3.11', 'console_scripts', 'gjslint')()
  File "c:\Program Files\Python\lib\site-packages\setuptools-0.9.8-py3.3.egg\pkg_resources.py", line 378, in load_entry_point
  File "c:\Program Files\Python\lib\site-packages\setuptools-0.9.8-py3.3.egg\pkg_resources.py", line 2566, in load_entry_point
  File "c:\Program Files\Python\lib\site-packages\setuptools-0.9.8-py3.3.egg\pkg_resources.py", line 2260, in load
  File "<frozen importlib._bootstrap>", line 1567, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1534, in _find_and_load_unlocked
  File "c:\Program Files\Python\lib\site-packages\closure_linter-2.3.11-py3.3.egg\closure_linter\gjslint.py", line 168
    print '%s: %d' % (path, len(path_errors))
                 ^
SyntaxError: invalid syntax

It would be really helpful if somebody can help with this. Thank you. 

Tyler Breisacher

unread,
Aug 5, 2013, 2:17:00 PM8/5/13
to closure-lin...@googlegroups.com
If I remember correctly, the 'string with %s in it' % (tuple, of, values) syntax is Python 2.x only. Are you using Python 3?


--
You received this message because you are subscribed to the Google Groups "Closure Linter Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to closure-linter-di...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Daniel Suchý

unread,
Aug 30, 2013, 7:10:21 AM8/30/13
to closure-lin...@googlegroups.com
When I wrote 'python' I got this:
Python 3.3.2 (v3.3.2:d047928ae3f6, May 16 2013, 00:06:53) [MSC v.1600 64 bit (AMD64)] on win32
To unsubscribe from this group and stop receiving emails from it, send an email to closure-linter-discuss+unsub...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages