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

Python 3.6: ply.yacc.YaccError: Unable to build parser #105

Closed
simon04 opened this issue Jan 20, 2017 · 13 comments
Closed

Python 3.6: ply.yacc.YaccError: Unable to build parser #105

simon04 opened this issue Jan 20, 2017 · 13 comments

Comments

@simon04
Copy link

simon04 commented Jan 20, 2017

Running python setup.py install fails with ply.yacc.YaccError: Unable to build parser.

$ python setup.py install

running install
Building lexer and parser tables.
Traceback (most recent call last):
  File "setup.py", line 130, in <module>
    main()
  File "setup.py", line 123, in main
    setup(**skw)
  File "/usr/lib/python3.6/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/usr/lib/python3.6/distutils/dist.py", line 955, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
    cmd_obj.run()
  File "setup.py", line 44, in run
    build_tables()
  File "setup.py", line 37, in build_tables
    outputdir='xonsh')
  File "/home/simon/src/gitsome/xonsh/parser.py", line 233, in __init__
    self.parser = yacc.yacc(**yacc_kwargs)
  File "/usr/lib/python3.6/site-packages/ply/yacc.py", line 3424, in yacc
    raise YaccError('Unable to build parser')
ply.yacc.YaccError: Unable to build parser

System info:

$ python 
Python 3.6.0 (default, Jan 16 2017, 12:12:55) 
[GCC 6.3.1 20170109] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import ply
>>> ply.__version__
'3.9'

Edit by donnemartin:

gitsome does not currently support Python 3.6. See this comment for more details and status.

@kshitij10496
Copy link

kshitij10496 commented Jan 20, 2017

Even I am facing the same issue with installation on MacOSX Sierra using Python 3.6 as:

$ pip3 install gitsome

@donnemartin
Copy link
Owner

@simon04 thanks for the report. I'm not able to reproduce on Python 3.5, I'll switch to 3.6 soon and try it out.

@johackim
Copy link

👍

@smit9612
Copy link

Got same error.

running install
Building lexer and parser tables.
Traceback (most recent call last):
File "", line 1, in
File "/private/var/folders/9p/0sqt2rlx7bl7wjyglgwz__380000gn/T/pip-d3ze49_6-build/setup.py", line 130, in
main()
File "/private/var/folders/9p/0sqt2rlx7bl7wjyglgwz__380000gn/T/pip-d3ze49_6-build/setup.py", line 123, in main
setup(**skw)
File "/usr/local/Cellar/python3/3.6.0_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/local/Cellar/python3/3.6.0_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/usr/local/Cellar/python3/3.6.0_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/private/var/folders/9p/0sqt2rlx7bl7wjyglgwz__380000gn/T/pip-d3ze49_6-build/setup.py", line 44, in run
build_tables()
File "/private/var/folders/9p/0sqt2rlx7bl7wjyglgwz__380000gn/T/pip-d3ze49_6-build/setup.py", line 37, in build_tables
outputdir='xonsh')
File "/private/var/folders/9p/0sqt2rlx7bl7wjyglgwz__380000gn/T/pip-d3ze49_6-build/xonsh/parser.py", line 233, in init
self.parser = yacc.yacc(**yacc_kwargs)
File "/usr/local/lib/python3.6/site-packages/ply/yacc.py", line 3426, in yacc
raise YaccError('Unable to build parser')
ply.yacc.YaccError: Unable to build parser

----------------------------------------

Command "/usr/local/opt/python3/bin/python3.6 -u -c "import setuptools, tokenize;file='/private/var/folders/9p/0sqt2rlx7bl7wjyglgwz__380000gn/T/pip-d3ze49_6-build/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /var/folders/9p/0sqt2rlx7bl7wjyglgwz__380000gn/T/pip-llgh286q-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/9p/0sqt2rlx7bl7wjyglgwz__380000gn/T/pip-d3ze49_6-build/

@sdebruyn
Copy link

+1 on this

Installing collected packages: gitsome
  Running setup.py install for gitsome ... error
    Complete output from command /usr/local/opt/python3/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/private/tmp/pip-build-g1wkshgw/gitsome/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-iuxg7a_m-record/install-record.txt --single-version-externally-managed --compile:

    running install
    Remove xonsh/parser_table.py
    Building lexer and parser tables.
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/tmp/pip-build-g1wkshgw/gitsome/setup.py", line 129, in <module>
        main()
      File "/private/tmp/pip-build-g1wkshgw/gitsome/setup.py", line 122, in main
        setup(**skw)
      File "/usr/local/Cellar/python3/3.6.0_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/core.py", line 148, in setup
        dist.run_commands()
      File "/usr/local/Cellar/python3/3.6.0_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/dist.py", line 955, in run_commands
        self.run_command(cmd)
      File "/usr/local/Cellar/python3/3.6.0_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/dist.py", line 974, in run_command
        cmd_obj.run()
      File "/private/tmp/pip-build-g1wkshgw/gitsome/setup.py", line 44, in run
        build_tables()
      File "/private/tmp/pip-build-g1wkshgw/gitsome/setup.py", line 37, in build_tables
        outputdir='xonsh')
      File "/private/tmp/pip-build-g1wkshgw/gitsome/xonsh/parser.py", line 233, in __init__
        self.parser = yacc.yacc(**yacc_kwargs)
      File "/usr/local/lib/python3.6/site-packages/ply/yacc.py", line 3426, in yacc
        raise YaccError('Unable to build parser')
    ply.yacc.YaccError: Unable to build parser

    ----------------------------------------
Command "/usr/local/opt/python3/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/private/tmp/pip-build-g1wkshgw/gitsome/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-iuxg7a_m-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/tmp/pip-build-g1wkshgw/gitsome/

@donnemartin
Copy link
Owner

I'm able to duplicate this on 3.6, but not on 3.5. Investigating...

@donnemartin donnemartin changed the title ply.yacc.YaccError: Unable to build parser Python 3.6: ply.yacc.YaccError: Unable to build parser Mar 13, 2017
@donnemartin
Copy link
Owner

donnemartin commented Mar 13, 2017

From what I can tell, this seems to be an issue with the parser for Python 3.6. This seems to be the relevant ticket: xonsh/xonsh#1717.

We should move towards completing #25 to bring gitsome up to speed with the latest xonsh.

Unless there's a simple patch that I'm missing, gitsome won't support Python 3.6 until #25 is resolved.

Edit: Added note about Python 3.6 incompatibility to README: 31a46f7

@hobbestigrou
Copy link

The github integration is awesome. But it's to bad the project doesn't works with python 3.6. I hope that will be fix soon.

@rsrini7
Copy link

rsrini7 commented Sep 18, 2018

is there any fix for python 3.6 ?
gitsome currently requires Python 3.4 or 3.5

@SUMUKHA-PK
Copy link

Hey @donnemartin can I work on the port? I will need some support though.

@donnemartin
Copy link
Owner

Hey all, sorry been really busy. I'm starting to free up and plan to look into updating gitsome to support the latest Python versions.

@zwep
Copy link

zwep commented Feb 14, 2019

@donnemartin Can you explain in some high level terms what needs to be changed? I am curious about the problem, because I never noticed THAT much of a difference between python 3+ versions

This was referenced Mar 31, 2019
@donnemartin
Copy link
Owner

Hi all, check out #160, gitsome now supports Python 3.7.

Uploaded to PyPI: https://pypi.org/project/gitsome/

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

Successfully merging a pull request may close this issue.

10 participants