Skip to content
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.

Traceback - keyword_token has no attribute string #3

Closed
GoogleCodeExporter opened this issue Jun 17, 2015 · 3 comments
Closed

Traceback - keyword_token has no attribute string #3

GoogleCodeExporter opened this issue Jun 17, 2015 · 3 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Use the following simple test case:

$ cat base.js
 (function() {
  })();

2. Run gjslint on it:

$ gjslint base.js

Internal error in /Users/tony/scratch/delta-2006.08.03/gjslint-example/base.js
Traceback (most recent call last):
  File "build/bdist.macosx-10.6-universal/egg/closure_linter/checkerbase.py", line 190, in CheckLines
    self.__metadata_pass.Process(token)
  File "build/bdist.macosx-10.6-universal/egg/closure_linter/ecmametadatapass.py", line 395, in Process
    self._ProcessToken()
  File "build/bdist.macosx-10.6-universal/egg/closure_linter/ecmametadatapass.py", line 412, in _ProcessToken
    context = (self._ProcessContext() or self._context)
  File "build/bdist.macosx-10.6-universal/egg/closure_linter/ecmametadatapass.py", line 291, in _ProcessContext
    if keyword_token.string in ('if', 'for', 'while'):
AttributeError: 'NoneType' object has no attribute 'string'
0 files checked, no errors found.


What is the expected output? What do you see instead?

I'd expect this to run successfully.

What version of the product are you using? On what operating system?

I installed closure_linter-latest.tar.gz this morning (Sept 1, 2010). I'm using 
Mac OS X 10.6.3, with the native system Python (Python 2.6.1 (r261:67515, Dec 
17 2009, 00:59:15)).



Original issue reported on code.google.com by t.ark...@gmail.com on 1 Sep 2010 at 7:10

@GoogleCodeExporter
Copy link
Author

This should be fixed as of GJsLint 2.2.4, svn revision 4.

Original comment by a...@google.com on 3 Sep 2010 at 12:35

  • Changed state: Fixed

@GoogleCodeExporter
Copy link
Author

Issue 4 has been merged into this issue.

Original comment by a...@google.com on 3 Sep 2010 at 12:39

@GoogleCodeExporter
Copy link
Author

Thanks, works great!

Original comment by t.ark...@gmail.com on 3 Sep 2010 at 12:58

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant