Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: 'NoneType' object has no attribute 'type' #65

Open
xiaoxiaoAurora opened this issue Jan 14, 2020 · 5 comments
Open

AttributeError: 'NoneType' object has no attribute 'type' #65

xiaoxiaoAurora opened this issue Jan 14, 2020 · 5 comments

Comments

@xiaoxiaoAurora
Copy link

Hello~ run the coomand: python2 j2py CoNLLStreamExtractor.java

Returned the following bug:

line 103:11 no viable alternative at input u'void'
line 103:11 no viable alternative at input u'void'
line 111:45 no viable alternative at input u'>'
line 186:8 no viable alternative at input u'List'
line 186:8 no viable alternative at input u'List'
line 186:43 mismatched input u'(' expecting SEMI
Traceback (most recent call last):
  File "j2py", line 259, in <module>
    sys.exit(runMain(configScript(sys.argv[1:])))
  File "j2py", line 57, in runMain
    return runOneOrMany(options)
  File "j2py", line 83, in runOneOrMany
    return runTransform(options)
  File "j2py", line 128, in runTransform
    transformAST(tree, config)
  File "D:\Python\python27\lib\site-packages\java2python\compiler\__init__.py", line 36, in transformAST
    for node in selector.walk(tree):
  File "D:\Python\python27\lib\site-packages\java2python\lang\selector.py", line 68, in walk
    for item in self.walk(child):
  File "D:\Python\python27\lib\site-packages\java2python\lang\selector.py", line 68, in walk
    for item in self.walk(child):
  File "D:\Python\python27\lib\site-packages\java2python\lang\selector.py", line 65, in walk
    for item in self(tree):
  File "D:\Python\python27\lib\site-packages\java2python\lang\selector.py", line 163, in __call__
    if tree.token.type == self.key:
AttributeError: 'NoneType' object has no attribute 'type'

Best wishes and good luck to you!

@YyHou
Copy link

YyHou commented Mar 14, 2020

I met the same problem.

@zhouyang430
Copy link

hi have you solve the problem?

@xiaoxiaoAurora
Copy link
Author

hi have you solve the problem?

No, I haven't.

@leaderiop
Copy link

i have the same probleme

@bunmalik
Copy link

Please I have the same problem, has it been resolved

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

No branches or pull requests

5 participants