Skip to content
This repository has been archived by the owner on Mar 23, 2023. It is now read-only.

Error when running grumpy on Fedora 25 #288

Closed
bkeys opened this issue Apr 18, 2017 · 5 comments
Closed

Error when running grumpy on Fedora 25 #288

bkeys opened this issue Apr 18, 2017 · 5 comments

Comments

@bkeys
Copy link

bkeys commented Apr 18, 2017

I compiled and installed from source on Fedora 25 and I get this error when I try to transpile a source file

Traceback (most recent call last):
  File "/usr/bin/grumpc", line 119, in <module>
    sys.exit(main(parser.parse_args()))
  File "/usr/bin/grumpc", line 77, in main
    visitor.visit(mod)
  File "/usr/lib/python2.7/site-packages/pythonparser/algorithm.py", line 41, in visit
    return self._visit_one(obj)
  File "/usr/lib/python2.7/site-packages/pythonparser/algorithm.py", line 32, in _visit_one
    return getattr(self, visit_attr)(node)
  File "/usr/lib/python2.7/site-packages/grumpy/compiler/stmt.py", line 321, in visit_Module
    self._visit_each(node.body)
  File "/usr/lib/python2.7/site-packages/grumpy/compiler/stmt.py", line 735, in _visit_each
    self.visit(node)
  File "/usr/lib/python2.7/site-packages/pythonparser/algorithm.py", line 41, in visit
    return self._visit_one(obj)
  File "/usr/lib/python2.7/site-packages/pythonparser/algorithm.py", line 32, in _visit_one
    return getattr(self, visit_attr)(node)
  File "/usr/lib/python2.7/site-packages/grumpy/compiler/stmt.py", line 292, in visit_ImportFrom
    self._write_py_context(node.lineno)
AttributeError: 'ImportFrom' object has no attribute 'lineno'
@trotterdylan
Copy link
Contributor

trotterdylan commented Apr 18, 2017 via email

@bkeys
Copy link
Author

bkeys commented Apr 20, 2017

you can do this with literally any source file and it will propagate the same error

@trotterdylan
Copy link
Contributor

I think I know what's going on: pythonparser is not being installed properly. When I do a fresh install and run grumpc I get:

grumpc
Traceback (most recent call last):
  File "/usr/bin/grumpc", line 27, in <module>
    import pythonparser
ImportError: No module named pythonparser

I'll come up with a fix later today.

trotterdylan added a commit to trotterdylan/grumpy that referenced this issue Apr 22, 2017
make install was broken since we moved to pythonparser because it was
not being copied into the install dir. Rather than just copying it into
the PYTHONPATH alongside grumpy, I thought it better to embed it within
the grumpy package so that it won't conflict with an installed
pythonparser.

This addresses: google#288
trotterdylan added a commit to trotterdylan/grumpy that referenced this issue Apr 22, 2017
make install was broken since we moved to pythonparser because it was
not being copied into the install dir. Rather than just copying it into
the PYTHONPATH alongside grumpy, I thought it better to embed it within
the grumpy package so that it won't conflict with an installed
pythonparser.

This addresses: google#288
trotterdylan added a commit that referenced this issue Apr 23, 2017
make install was broken since we moved to pythonparser because it was
not being copied into the install dir. Rather than just copying it into
the PYTHONPATH alongside grumpy, I thought it better to embed it within
the grumpy package so that it won't conflict with an installed
pythonparser.

This addresses: #288
@trotterdylan
Copy link
Contributor

I think this is fixed in #291

Please reopen if you continue to have problems.

@ch3ck
Copy link

ch3ck commented Apr 25, 2017

I have a similar issue here on Fedora 25: #299

davidc05 added a commit to davidc05/grumpy1 that referenced this issue Jul 20, 2020
make install was broken since we moved to pythonparser because it was
not being copied into the install dir. Rather than just copying it into
the PYTHONPATH alongside grumpy, I thought it better to embed it within
the grumpy package so that it won't conflict with an installed
pythonparser.

This addresses: google/grumpy#288
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants